Using Controller alias (Controller AS syntax)
- New technique in Angular 1
- No need to inject $scope object but internally uses $scope itself
- Makes code more readable
Using $scope
- Old technique in Angular 1
- Need to inject the $scope object in your controller definition
No comments:
Post a Comment
Note: only a member of this blog may post a comment.