3 ms·
> Problem #1: Scope inheritance and dynamic scoping Easily solved by using the controllerAs syntax > Problem #2: Dirty checking One time binding to the rescu
by vikingcaffiene 11y ago
> Problem #1: Scope inheritance and dynamic scoping
Easily solved by using the controllerAs syntax
> Problem #2: Dirty checking
One time binding to the rescue here. Been available for a good while now. Dirty checking does suck though but is usually not a deal breaker.
> Problem #3: Dependency injection
The authors main problem here seems to be with problems minifying the code. All one needs to do is to pass in an annotations array which is an established best practice. So instead of controller('ControllerName', function($scope, $someService){}) one should use controller('ControllerName', ['$scope', '$someService', function($scope, $someService){}]) there are other more readable ways to do this such as $inject but I digress.
> Problem #4: Pointless complexity
This is debatable and more a matter of opinion. I disagree and think the glut of the authors woes come from not taking the time to understand the framework properly. The learning curve is steep yes but I've used a TON of javascript frameworks and Angular consistently comes out the winner long term in maintainability and stability.
> Problem #5: Server-side rendering
Isomorphic javascript to the rescue here. React does it better in this case but its available if you need it. Angular is a single page web app. If you knew that going in and have a problem with it now... well lets just say that its important to understand the trade offs that come with any technology one chooses to include in their stack.
> Problem #6: Angular 2
Yes this was a concern, and then the angular team listened to the outcry from the community and now have been developing a migration path for users of the 1x code. They have also dedicated an entire team to continue development on the 1x codebase for as long as it remains popular thats why there are two angular websites.
While I admit that angular isn't perfect (literally nothing is) nearly all of the authors criticisms are due to lack of following best practices. You can find a pretty good summation here: https://github.com/johnpapa/angular-styleguide https://github.com/johnpapa/angular-styleguide