Monday, November 30, 2015

Defining multiple controller

<div class="widget" ng-controller="widgetController">
    <p>Stuff here</p>
</div>

<div class="menu" ng-controller="menuController">
    <p>Other stuff here</p>
</div>
 
 
function widgetController($scope) {
   // stuff here
}

function menuController($scope) {
   // stuff here
} 

No comments:

Post a Comment