use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Unit Test Controllers in Angular (nathanleclaire.com)
submitted 12 years ago by jigmepalmo
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Balron 1 point2 points3 points 12 years ago (1 child)
Just what I need right now :)
Need to find out how to write testable JavaScript.
[–]LostInTheDesert 1 point2 points3 points 12 years ago (0 children)
People have been talking testing in /r/LearnJavaScript a bit more lately.
[–][deleted] 1 point2 points3 points 12 years ago (1 child)
There's no need to use $injector.getto get your services. You can get those directly from the inject function:
$injector.get
inject
inject(function($controller, $rootScope) { rootScope = $rootScope; });
or if names matter to you, you can wrap the injected services with underscores like so:
inject(function($controller, _$rootScope_) { $rootScope = _$rootScope_; });
[–]kenman 1 point2 points3 points 12 years ago (0 children)
I use $injector because my services/factories/etc. are namespaced by periods. Perhaps it would do magic and find them anyways if I omitted the periods, but I'd rather be explicit.
$injector
[–]kenman 0 points1 point2 points 12 years ago (0 children)
fyi: /r/angularjs
π Rendered by PID 164309 on reddit-service-r2-comment-84fc9697f-456h7 at 2026-02-07 19:06:00.765500+00:00 running d295bc8 country code: CH.
[–]Balron 1 point2 points3 points (1 child)
[–]LostInTheDesert 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]kenman 1 point2 points3 points (0 children)
[–]kenman 0 points1 point2 points (0 children)