Angle2中的Angular1范围变量

时间:2016-08-17 10:43:03

标签: javascript angularjs html5 angular typescript

我正在使用范围。$ on,范围。$ watch,范围。$ broadcast,$ scope。$ apply,$ scope。$ emit。等{/ 1}}中的。但是当我尝试在angular1中编写代码时,我听说这些属性在angular2中无效。所以任何人都建议替代那些东西。

1 个答案:

答案 0 :(得分:0)

你在Angular2中没有提到任何内容 在Angular2中,您使用服务和可观察对象。

另见https://angular.io/docs/ts/latest/cookbook/component-communication.html#!#bidirectional-service