I have the following codes :
The state (lets just make it short for simplicity purposes)
.state('foo', {
url: '/foo',
templateUrl: 'path/to/template.html',
controller:'fooCtrl',
})
The controller
controller = function($scope){
// not the actual code
$scope.barCount
}
template.html
<div>
<span>{{ barCount }}</span> // this is updating properly
</div>
Other html partial
<div ng-controller="fooCtrl">
<span>{{ barCount }}</span> // this is **NOT** updating properly
</div>
I have a scope
variable on my controller. The 2-way binding is working fine on the template that was declared on the state
together with the controller. But not on the other partial template where in I binded the controller using the ng-controller
.
Is this some kind of bug? Or am I missing something? Thanks.