Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

NgModel in a @deferred component doesn't work properly #578

Closed
furrary opened this issue Aug 10, 2017 · 2 comments
Closed

NgModel in a @deferred component doesn't work properly #578

furrary opened this issue Aug 10, 2017 · 2 comments

Comments

@furrary
Copy link
Contributor

furrary commented Aug 10, 2017

It can be built without error, but the model won't update.

repro

// app_component.dart
import 'package:angular/angular.dart';
import 'src/my_input/my_input_component.dart';

@Component(
  selector: 'my-app',
  directives: const [InputComponent],
  template: r'<my-input @deferred></my-input>',
)
class AppComponent {}
// src/my_input/my_input_component.dart
import 'package:angular/angular.dart';

@Component(
  selector: 'my-input',
  directives: const [formDirectives],
  template: r'<input [(ngModel)]="model"> {{ model }}',
)
class InputComponent {
  String model;
}
@matanlurey
Copy link
Contributor

Thanks for filing and for the reproduction case!

@ferhatb
Copy link
Contributor

ferhatb commented Aug 14, 2017

Thank you for repro case. We have a fix. It is in review.

alorenzen pushed a commit that referenced this issue Aug 15, 2017
missing detectChangesInNestedViews call in parent view is causing views to fail
basic change detection post initialization.

Closes #578

PiperOrigin-RevId: 165277111
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants