al-controller¶
Overview¶
- The directive makes child scope, then calls a controller, then aLight bind scope with DOM
- input argument (not necessary): name of controller
<div al-controller="bookCtrl"></div>
<div al-controller="bookCtrl as book"></div>
function bookCtrl(scope) {
}
also you can place the controller into alight.controllers or in Scope.$ns for private controllers
alight.controllers.bookCtrl = function(scope) {
}