- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I got as far as ng-click="doSomething()" and immediately thought, darn, someone found my code and TDWTFed it.
Admin
That's not too bad, imagine if the click handler was doNothing.
Addendum 2020-12-17 09:36: Or even worse, doAnything.
Admin
Might want to correct that this is for AngularJS. Angular generally refers to anything from the 2.x+ on, which helps disambiguate if you have something which can be upgraded, or a years old pile of cruft which will need to be rewritten in the next year.
Admin
The best time to use a
$watch
is immediately after you've thoroughly exhausted all other possible options at least three times.Or when you're feeling sassy about debugging and console.log entries.
Admin
[quote]best time to use a $watch is [quote]
Speaking of time,
Addendum 2020-12-17 13:13: oops, left out the "/" in the endquote
Admin
AngularJS is finally getting sunsetted? I worked on it around when Angular 2.0 was in its RC phase, and they promised that AngularJS was going to be maintained.
I also worked on porting some code to Angular 2.0 during the RC phase, when was absolutely no fun: Google thinks "RC" means "time to mess with things!" So I'd get a new RC about once a month, with a new way to init the app, and the old way deprecated, and the old way removed about a month after that. Reeeeally no fun.
And while $scope was a bad idea, the ENTIRE APP I was working on depended on it heavily for communication between components. So switching to Angular 2.0 would be a nearly-complete rewrite. We ended up switching to React instead.
Admin
Because that didn't entail a complete rewrite?
Admin
AngulaJS sucks no matter what. It's asinine. Yes I wrote a project in it with a team, and it's a real PITA to scale, pita to deploy, pita to maintain (love when those packages for grunt or gulp just randomly break)
Admin
Well, it would have either way, right?
Admin
no: please choose one of
that criterion those criteria
Admin
"that criteria"
It's either "those criteria" or "that criterion".
Addendum 2020-12-18 10:21: Heh, we think alike
Admin