lega911 / angular-light

Alight is a library for building interactive MVVM web interfaces/applications. (project is deprecated)
MIT License
274 stars 43 forks source link

direct directive + env==this, instead of al-ctrl #180

Closed lega911 closed 8 years ago

lega911 commented 8 years ago
<div $main="value"></div>
<div main()="value"></div>
<div *main="value"></div>
function main(scope, element, value, env) {
  this.watch('...', callback);
  this.scan();
}
lega911 commented 8 years ago

env.init, env.link

env = Env(element, attributes, ...)

envDirective = env.directive(directiveInit) envDirective.init envDirective.link envDirective.watch envDirective.scan envDirective.changeDetector envDirective.changeDetector.scope ...