‘Controller as’ or ...
 
Notifications
Clear all

‘Controller as’ or ‘$scope’ in AngularJS  


Djones
Posts: 3
(@djones)
New Member
Joined: 1 month 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 🙂

1 Reply
Codr
Posts: 2
 Codr
(@codr)
New Member
Joined: 1 month ago

I have seen both... personally prefer Controller as  

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

Reply