在AngularDart 3.0.0中,不推荐使用EventEmitter.那么,如何将子组件中的事件发送给父组件?
在更新之前,它看起来像:
@Component(
selector: 'my-test',
templateUrl: 'test.component.html'
)
class TestComponent {
@Input()
String name = '';
@Output()
EventEmitter<String> onNameChange = new EventEmitter<String>();
}
...
onNameChange.emit('New Name');
...
Run Code Online (Sandbox Code Playgroud)
现在我需要使用Stream和StreamController.有人能举个例子吗?