‘Controller as’ or ...
 
Notifications
Clear all

‘Controller as’ or ‘$scope’ in AngularJS  


Djones
Posts: 7
(@djones)
Active Member
Joined: 4 months 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
Codr
Posts: 4
 Codr
(@codr)
New Member
Joined: 3 months ago

I have seen both... personally prefer Controller as  

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

Reply
1 Reply
Djones
(@djones)
Joined: 4 months ago

Active Member
Posts: 7

@codr Thanks!

Reply