Class()
Class
Stable Function
Class Export
export Class(clsDef: ClassDefinition) : Type<any>
Provides a way for expressing ES6 classes with parameter annotations in ES5.
Basic Example
var Greeter = ng.Class({ constructor: function(name) { this.name = name; }, greet: function() { alert('Hello ' + this.name + '!'); } });
is equivalent to ES6:
class Greeter { constructor(name) { this.name = name; } greet() { alert('Hello ' + this.name + '!'); } }
or equivalent to ES5:
登录查看完整内容