Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto - Import for .ts Components in Sublime Text 3

I'm working on an AngularJS beginner Tutorial and the mentor is working with another IDE.

I prefer to use SublimeText3 because I am familiar with it. When I am declaring a new component in my app.module.ts (Marked with [1] in the code), then the import of the components ts file (Marked with [2] in the code) should be generated automatically in best case.

Is that possible?

I have installed import.js. But I have to start the generating of the import manually with this plugin - that isn't very helpful.

/** Created by mPiontek on 25.01.2017 */

import {BrowserModule} from "@angular/platform-browser"
import {NgModule} from "@angular/core"

import {AppComponent} from "./app.component";
import UserComponent from './user/user.component'; // [2]

@NgModule ({
    imports: [BrowserModule],
    declarations: [AppComponent, UserComponent],  // [1]
    bootstrap: [AppComponent]
})

export class AppModule {}
like image 602
Martin P. Avatar asked Nov 09 '22 02:11

Martin P.


1 Answers

try to use sublime plugin ImportHelper for autocompletion of imports

like image 100
Natalia V Avatar answered Nov 15 '22 12:11

Natalia V