Tools like ng-annotate let you use implicit dependency annotations in your app and automatically add inline array annotations prior to minifying. If you decide to take this approach, you probably want to use ng-strict-di.
Long store short:
<html ng-app="myApp" ng-strict-di>
or
angular.bootstrap(document, ['myApp'], {
strictDi: true
});
($index == $ctrl.selected.index && $ctrl.page == $ctrl.selected.page)
Can you create a plunkr @lighth7015 ? Not very clear what you want to do, or atleast not what you mean with:
do I need to re-trip the html creation by emptying out my temporary listview every time I change pages?
I just found that if I use $scope to bind value to view and I use ng-model in an input, the value set in the controller shows in the view by default...but this is not the case if I use the Controller as Syntax.
For example this works:
// Js
var myApp = angular.module("myApp", []);
myApp.controller('MainController', function($scope) {
$scope.model = "Initial value"
})
// View
<input type="text" name="model" ng-model="model"><br/>
the input onload has the text "initial value"
var myApp = angular.module("myApp", []);
myApp.controller('MainController', function() {
this.model = "Initial value"
})
<div ng-controller="MainController as main">
{{main.model}}
</div>