1
私はアンギュラ2を初めて使用しています。設定を行うにはすべての要件を満たしていますが、まだエラーが発生しています。 これは、私はすでに私のルートフォルダにNode.jsのクイックスタートのファイルをインストールしていますが、すでにpackages.jsonからパッケージを復元し、私のコンポーネントビジュアルスタジオでアンギュラ2を設定する
import { Component } from "@angular/core"
@Component({
selector = 'my-app',
template = `<h1> Hello {{name}} </h1>`
})
export class AppComponent {
name: string = "First Project";
}
です。あなたが選択
これはされて私は私のプロジェクト
- TS2552を構築していたとき、私は、このエラーが発生しています私app.module.ts
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './app.component'; @NgModule({ imports: [ BrowserModule ], declarations: [ AppComponent ], bootstrap: [ AppComponent ] }) export class AppModule { }
は、これが私のtsconfig.jsonある
{ "compileOnSave": true, "compilerOptions": { "target": "es5", "module": "commonjs", "moduleResolution": "node", "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "lib": [ "es2015", "dom" ], "noImplicitAny": true, "suppressImplicitAnyIndexErrors": true, "typeRoots": [ "../node_modules/@types" ] } }
感謝:) #peace – faizan
、答えを受け入れてください:) –