嗨,我想在ts文件中的Component内使用Selector,templateUrl和styeUrls。我能够加载html文件,但是y css没有得到应用。
请在下面找到我的ts代码。
@Component({
selector: 'app-entity-registration',
templateUrl: './entity-registration.component.html',
styleUrls: ['./entity-registration.component.css']
})
My code structure inside src - app - root - Myproject - pages
放置光标时出现的错误是:
[ts]
Argument of type '{selector: string; tmplateUrl: string; styleUrls:string[]; }' is not assignable parameter of type 'Component'.
Property 'true' is missing in type '{selector: strig; templateUrl: string; styleUrl:strig[];}'
我被这个错误绞死了2天...请帮助我解决。
请找到我正在使用的以下版本的软件包。
Angular CLI: 6.2.9
Node: 8.9.4
OS: win32 x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.8.9
@angular-devkit/build-angular 0.8.9
@angular-devkit/build-optimizer 0.8.9
@angular-devkit/build-webpack 0.8.9
@angular-devkit/core 0.8.9
@angular-devkit/schematics 0.8.9
@angular/cdk 7.3.1
@angular/cli 6.2.9
@angular/material 7.3.1
@ngtools/webpack 6.2.9
@schematics/angular 0.8.9
@schematics/update 0.8.9
rxjs 6.2.2
typescript 2.9.2
webpack 4.16.4