Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sure, there are a lot of subtle things which have been improved in later Angular versions.

First of all, you don't need $scope anymore in controllers, you can still use it for functions like $watch, but you don't need to inject it in just to add properties to your controller, you can just use `this.foo = 'bar';`

You also have the controllerAs syntax which I don't think is present in earlier Angular versions, which provides a shorthand for your controller, and bindToController for directives, which allows you to bind attribute values directly to the directives controller without extra syntax.

If I remember other things I will update this comment.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: