Dismiss this article. It's a waste of time and energy. In fact, I really shouldn't even be wasting my time commenting on it.
Seems pretty evident from the horrible jankiness of this blog. Heavy as shit and it loads on the 5th try.
And now it says 500
> Error details are currently disabled. Please set StaticConfiguration.DisableErrorTraces = false; to enable.
$scope.displayName = function () {
if ($scope.anonymous()) {
return;
}
$scope.displayName = $scope.name;
};
I have no idea how that's related to Angular, though. It looks like it's just bad programming practice.Angular has some great stuff, and some really necessary ideas and principles that were sorely needed in Javascript. I love working with it, most of the time. But it also has some serious design errors.
This blog post is pretty horrid though.
I find myself moving more of my code into pure JS & borrowing concepts from languages like Java (interfaces, abstract classes, etc.) to increase agility in the event I want to move towards using a different library/framework. I gave a talk related to this idea of a frontend SOA about a week ago - here are the slides: http://slides.com/wesleycho/soa-angular
Here's a good writeup: http://toddmotto.com/digging-into-angulars-controller-as-syn...
Yup, I don't get it. I guess not only am I eternally doomed to be a junior dev but also am being compared to a child, a monkey typing at a typewriter, but also someone who doesn't know JS at all. Feels good man.
Other than some horribly obtuse undefined checking, there's no explanation of what the problem is. The argument seems to be that the controller depends on $scope. I... I thought that was the point. From the first line of documentation on controllers:
>In Angular, a Controller is a JavaScript constructor function that is used to augment the Angular Scope.
If the idea is that this is a bad habit to bring elsewhere, fine. Some more explanation would be nice, but whatever. But the implication is that this is a trap within the context of Angular dev itself.