5

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 {}
Rohan Büchner
  • 5,333
  • 4
  • 62
  • 106
Martin P.
  • 292
  • 2
  • 11
  • Try to use IDE too, I'm sure you'll see how it is convenient – GProst Jan 27 '17 at 08:52
  • Isn't SublimeText an IDE, too :D ? I'm not willed to pay for WebStorm - Sublime Text did the job for me until now! I just want to try this little "problem". – Martin P. Jan 27 '17 at 08:54

1 Answers1

1

try to use sublime plugin ImportHelper for autocompletion of imports

Natalia V
  • 75
  • 4
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 06 '21 at 16:33
  • With Mac OS, modules can be imported automatically by pressing on [Control]+[Command]+[I] with that package – Pierre Dec 15 '21 at 10:44