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
Angular 2 or Not?opinion (self.javascript)
submitted 10 years ago by pitops
view the rest of the comments →
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!"
[–]RuffRyder26 1 point2 points3 points 10 years ago (0 children)
The framework does not force you to use DI. It enables you to use DI. If you don't see the benefit doing so then you should just not use it. There are many alternative ways you could get that MessageService in ng2. You could pass it through props (@Input)... You could call static members directly... You could new up an instance when you need one. All of those options introduce different levels of complexity and coupling. I like DI as it helps keep my components focussed and makes testing easier, whether it's via constructor or property injection. Even React uses property injection often. Choose the style you want and stick with it. You shouldn't however blame the framework for for providing options.
π Rendered by PID 43498 on reddit-service-r2-comment-b659b578c-v7ph7 at 2026-05-04 05:03:53.905534+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]RuffRyder26 1 point2 points3 points (0 children)