模板解析错误:无法绑定到'{ngModel}',因为它不是'input'的已知属性

时间:2017-08-23 16:05:18

标签: javascript html html5

我做了关于ngModel的所有事情,但我仍然遇到了问题

Template parse errors: Can't bind to '{ngModel}' since it isn't a known property of 'input'. (" type="text"

我的代码:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { ServerComponent } from "./server/server.component";
import { ServersComponent } from './servers/servers.component';

@NgModule({
  declarations: [ 
    AppComponent,
    ServerComponent,
    ServersComponent 
  ], 
  imports: [ 
    BrowserModule,
    FormsModule 
  ], 
  providers: [],
  bootstrap: [AppComponent] 
})

export class AppModule { } 

Example Picture

0 个答案:

没有答案