I\'m wondering what the use cases are for these two methods of creating a controller:
Using ngController:
myApp.controller(\'myContr
The directive controller call each time when the directive is call i mean
The directive controller call 3 time and each has own scope.
And ngController has also same nature . But ngcontroller can also reuse in other directives / html pages .
you can also put ngcontroller in directive (we assume that appCtrl define in any controller.js file)
.directive('directive',function(){
return{
scope:{},
template:"{{hello}}",
controller:"appCtrl"
}
})