Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 668 Bytes

al-controller.rst

File metadata and controls

31 lines (21 loc) · 668 Bytes

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) {
}