0
我只是在運行一些基本的默認鍋爐板代碼,我編輯這個文件:AngularJS,輸入文本框甚至沒有顯示
app.component.html
<input type="text" [(ngModel)]="name">
<p> {{name}} </p>
app.component。 ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
name = '';
}
但是,這從字面上什麼都不做。只有一個空白頁面。我究竟做錯了什麼?這似乎很基本
我沒有看到任何地方的AppModule,HTTP://i.imgur.com/rylpbQE.png – Bana
@Bana沒辦法,請plunker的.. 'app.module.ts'是你正在尋找的文件。 –
感謝兄弟。它正在工作。但我很好奇,爲什麼沒有提供?我正在觀看一個教程,他只是做了相同的基本創作,並簡單地使用'[(ngModule)]'蝙蝠而不需要任何這個? – Bana