Live data from Hacker News

Things that suck in AngularJS

lhorie.blogspot.ca

11–20 of 151 posts

Re: Things that suck in AngularJS

#12
I agree with most of the things mentioned in the article, but here are a couple of nits, just in case you have that exact problem and look for the fix:

$timeout having no $cancelTimeout: that's just called $timeout.cancel(), taking the promise you got out of the initial $timeout call.

$.when is called $q in AngularJS, support for promises actually runs deep in the framework.

Regarding the difficulty of instantiating controllers, and controlling who publishes what on the $scope when: I think there should be a style rule that you never, ever have some piece of JavaScript depend on the fact that some other piece of JS adds a variable to its parent scope. Yes, that's global state, or dynamic scoping, and should never be used. Just create a service if you need two directives to communicate. This gets more obvious and easier with 1.2 and the controller-as style.

Bi-directional data binding should never get you into a loop if you take care to only use the APIs in ngModelController. If you managed to trigger a loop, you're probably using the wrong API - loops are something that can happen in bi-directional data binding, but it's not a given.

This is not to say the author is wrong, as said above, I agree with most of his points.

Re: Things that suck in AngularJS

#13
Can't google just hire an intern to update the documentation? C'mon guys, it would likely be the very cheapest and most effective thing they could do at this point.

Re: Things that suck in AngularJS

#15

Documentation is by far the worst part of Angular. I spent 90% of my time Googling and 10% writing code. (Hey, maybe that's Google's plan -- ramp up traffic to search. Synergy!) AngularUI is confusing, mostly undocumented and often behind Angular. Splitting ngRoute/ngAnimate into their own files is an odd choice, although I assume the former is so they can replace it with the superior ui-router. Which also is weird.…

> Google has the chance to build the new framework that will run the web in 2-3 years. Much like Rails a few years ago. Angular is an amazing framework. It seems like they just don't care.

People use to say that about ExtJS a few years ago , then BackboneJS, etc ... There will never be one framework to rule them all , like Rails never ruled server-side developpment, Rails influenced other frameworks. Likewise Angular will , and something better than Angular will come by.

> Angular needs someone versed in developer usability to take control of the public facing Angular stuff and give it a complete overhaul. Right now, it's the result of hundreds of people haphazardly making changes.

that's how most open-source projects work. Angular is not a Google library, Google already has closure[1] , which is neat and scales(ie great performance,unlike Angular), Gmail is built on top of it , but strangely nobody else but google is using it...

EDIT :

[1] https://developers.google.com/closure/library/

Re: Things that suck in AngularJS

#16
post #7

Documentation is by far the worst part of Angular. I spent 90% of my time Googling and 10% writing code. (Hey, maybe that's Google's plan -- ramp up traffic to search. Synergy!) AngularUI is confusing, mostly undocumented and often behind Angular. Splitting ngRoute/ngAnimate into their own files is an odd choice, although I assume the former is so they can replace it with the superior ui-router. Which also is weird.…

I agree that the documentation could be better. When I first started working with Angular I had similar issues. However, after spending a decent amount of time working with the framework, I find the documentation fairly clear. The problem is really the lack of concrete examples of how things fit together. However, Angular UI is a totally separate set of projects that is not run by the Angular team at all. Not sure wh…

I think the documentation has improved. I think the Developer Guide provides a good high level. Perhaps some opinionated best practises & design patterns would help.

And yea, Angular UI is awesome.

Re: Things that suck in AngularJS

#18

Documentation is by far the worst part of Angular. I spent 90% of my time Googling and 10% writing code. (Hey, maybe that's Google's plan -- ramp up traffic to search. Synergy!) AngularUI is confusing, mostly undocumented and often behind Angular. Splitting ngRoute/ngAnimate into their own files is an odd choice, although I assume the former is so they can replace it with the superior ui-router. Which also is weird.…

Is there a Javascript MVC framework that actually has good documentation, guides, and code samples? I've been working with Ember.js, but it's incredibly frustrating trying to learn a framework whose documentation is incomplete. The other problem I've found is that docs, tutorials, and Stack Overflow posts that are even six months old are often completely useless when troubleshooting bugs in Ember.js or even learning…

I started with Ember about a year ago and the getting started docs were pretty terrible. It took a lot of experimentation and frustration before I was comfortable developing with it. Eventually I became familiar with the framework and the API docs are quite in-depth, not really great for a beginner though. After about four Ember projects I can now prototype a large app (using something like Bootstrap) in a day or so, so I feel that pain at the start was worth it. Back at the time though I was tearing my hair out, especially over router changes. The changes improved things by an order of magnitude though. I trust the Ember team, I'm happy now, the start could have been easier.

Re: Things that suck in AngularJS

#19

If you think angular docs are bad , you should try ember. Ember is so frustrating. All answers on SO are out of date or wrong.

Neither good SO answers nor docs emerge out of thin air. If you find the right way to do something, document it, write it down, submit a PR.

Re: Things that suck in AngularJS

#20
post #6

Earlier quoted context omitted.

Is there a Javascript MVC framework that actually has good documentation, guides, and code samples? I've been working with Ember.js, but it's incredibly frustrating trying to learn a framework whose documentation is incomplete. The other problem I've found is that docs, tutorials, and Stack Overflow posts that are even six months old are often completely useless when troubleshooting bugs in Ember.js or even learning…

I felt like Backbone.js (when I was actively using it) had really clean and complete docs. Couple that with the fact that the source is incredibly readable and debugging anything strange was never that tough.

Sure, but Backbone does a fraction of what Angular does. And, it's pretty consistent with how most people write JS anyway -- whereas Angular pretty much re-envisioned everything.
Post reply on HN