‘Controller as’ or ...
 
Notifications
Clear all

‘Controller as’ or ‘$scope’ in AngularJS

3 Posts
2 Users
0 Likes
628 Views
Posts: 7
Topic starter
(@djones)
Active Member
Joined: 3 years ago

I am use to $scope in AngularJS controller. 

The project I am contracting on use ‘Controller as’ and I don’t see why. 

What’s the proper way out there apart from moving to latest Angular 8 🙂

Reply
2 Replies
Posts: 4
 Codr
(@codr)
New Member
Joined: 3 years ago

I have seen both... personally prefer Controller as  

Try to avoid directly using $scope variables in the view.

Reply
1 Reply
(@djones)
Joined: 3 years ago

Active Member
Posts: 7

@codr Thanks!

Reply