Search code examples
angularangular2-formsuniversal

Angular 4.1 + Universal not detecting changes


I have upgraded my project (angular2 + universal) to Angular 4.1. I've got my project ready to work but now I have a problem.

Angular is not detecting changes in my model. For example:

@Component({
  changeDetection: ChangeDetectionStrategy.Default,
  encapsulation: ViewEncapsulation.Emulated,
  selector: 'app',
  template: `
      <input type="text" [(ngModel)]="title">
      {{title}}
      <router-outlet></router-outlet>
  `
})
export class AppComponent {
  title = 'ftw';
}

Variable title never change.

Anyone knows what could be happening?

EDIT

An example: https://github.com/Josmorsot/universalng4-error.git


Solution

  • The error was that I was using 'zone.js/dist/zone-node' instead 'zone.js/dist/zone' at client.ts and client.aot.ts