Closed lega911 closed 7 years ago
alight('#app', { data: 'info', click: () => {} }) var cd = alight('#app', function(scope) { this.watch('name') this.click = () => { this.scan() }) }); cd.scan();
alight.directives.al.test = function(scope, element, value, env) { this.watch() this.scan() }
<div main-ctrl()></div>
function mainCtrl(scope, element, value, env) { this.watch(); } // scope.mainCtrl = function(scope, element) {};
//alight.createComponent -> alight.component alight.component.book = function(scope, element, env) { this.watch(); this.scan(); return { template: '', onStart: function() {} } }; alight.component.book = { template: '', onStart: function(scope, element) { this.watch() this.scan() } }; alight.d.$global.book = { component: function(scope, element, env) { return { template: '', onStart: function() {} } } };
<div>{{when | date yyyy-mm-dd }}</div>
+1
Binding
Directives / Controller
Component
Filters