Napotkany problem z generowaniem komponentów za pomocą kątowego-cli ng-cli nie dodaje nowego modułu do modułu aplikacji:ng-cli nie dodaje składników do modułu aplikacji
$ ng g component Try
installing component
create src\app\try\try.component.css
create src\app\try\try.component.html
create src\app\try\try.component.spec.ts
create src\app\try\try.component.ts
update src\app\app.module.ts
No app module found. Please add your new class to your component.
Nie przenieśliłem żadnego pliku. Struktura projektu jest domyślna. src\app\app.module.ts
istnieje i ma następującą zawartość:
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {HttpModule} from '@angular/http';
import {RouterModule} from '@angular/router';
import {AppComponent} from './app.component';
import {ROUTES} from "./app.routes";
@NgModule({
imports: [
BrowserModule,
FormsModule,
HttpModule,
RouterModule.forRoot(ROUTES)
],
declarations: [
AppComponent
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
}
Wszystko wygląda w porządku.
@Kinduser to jest po prostu Command Line poprosi – zhekaus
@Kinduser ale gdzie? Chciałbym wiedzieć, na czym opiera się generator, kiedy szuka modułu aplikacji ... – zhekaus
C: \ webProj \ EngMe \ web_engme – zhekaus