Skip to content

Commit

Permalink
fix(nav): Support controllerAs syntax (ionic-team#3058, ionic-team#…
Browse files Browse the repository at this point in the history
…2499) in ion-nav-view
  • Loading branch information
urish committed May 1, 2015
1 parent 08c37f9 commit c057f23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/angular/controller/navViewController.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ function($scope, $element, $attrs, $compile, $controller, $ionicNavBarDelegate,
if (viewLocals && viewLocals.$$controller) {
viewLocals.$scope = viewScope;
var controller = $controller(viewLocals.$$controller, viewLocals);
if (viewLocals.$$controllerAs) {
viewScope[viewLocals.$$controllerAs] = controller;
}
$element.children().data('$ngControllerController', controller);
}

Expand Down

0 comments on commit c057f23

Please sign in to comment.