在es5的ng.core.component中使用了.class方法

whta is use of .Class method in ng.core.component in es5

本文关键字:class 方法 component es5 ng core      更新时间:2023-09-26
var app = ng.core.Component({
 selector:'myapp',
template:'<h1>helloworld</h1>'
}).
Class(
{
constructor:function()
}
);

根据angular2快速入门指南:

Class方法是我们实现组件本身的地方,赋予它绑定到视图的属性和方法,以及任何适合这部分UI的行为。

裁判:https://angular.io/docs/js/latest/quickstart.html # !# add-the-component-file