W
W
way_t2017-03-04 16:14:48
Angular
way_t, 2017-03-04 16:14:48

Angular 2. ngmodel not working on Windows. How to figure it out?

5ac4aa47f0ea425e8e248dc3372157d7.PNGI started reading and sequentially going through the Angular 2 documentation. In the very first tutorial, it is proposed to use the built-in Angular 2 NgModel directive, which allows you to do two-way data binding (to dynamically change objects in all places).
There was also a warning that npm start on Windows bash fails because it is not communicating with the server as of January 2017.
Question: How can this be resolved?
PS: A snapshot of the error itself. The code from the documentation is used.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
majestik, 2017-03-04
@majestik

For ngModel, you need to connect FormsModule in app.module:
And add to imports:

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

https://angular.io/docs/ts/latest/tutorial/toh-pt1.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question