- Nov 2020
-
imfeld.dev imfeld.dev
-
Converting Angular components into Svelte is largely a mechanical process. For the most part, each Angular template feature has a direct corollary in Svelte. Some things are simpler and some are more complex but overall it's pretty easy to do.
-
- Sep 2020
- Feb 2017
-
angular.io angular.io
-
how it uses zones
Does anyone have an authoritative link for this concept of zones and how they work? It'd be much appreciated.
-
In general, add providers to the root module so that the same instance of a service is available everywhere.
So, from this I take it that once a Service is added to the root module, it can be used by any component of that module.
What about the components imported, from sub-modules of the root one? Can their dependency needs be met, in similar fashion? For example, could a Component in another module (imported into the root one) just request a Service provided in the root module and have it properly injected from there, without anything else on the developer's part?
-
you get a new instance of the service with each new instance of that component
So, I take it that the Service instance will not be a singleton anymore? Whereas, if provided from the root module, it will?
-
- Jan 2017
-
angular.io angular.io
-
Component classes should be lean. They don't fetch data from the server, validate user input, or log directly to the console. They delegate such tasks to services.
A really good point! Lean-ness is something to strive for.
-
While a component is technically a directive, components are so distinctive and central to Angular applications that this architectural overview separates components from directives.
As per the MVVM pattern, they sort of provide the support for the View. They are like the glue for the visual representation of a part of the application. A controller of sorts (but not quite one) of MVC.
-
other metadata decorators
A somewhat comprehensive list of the currently available class decorators and their roles can be found in the Official Angular Cheat Sheet.
-
- Mar 2016
-
angularjs.blogspot.com angularjs.blogspot.com
-
The basic argument here is that templates have an advantage because they are constrained compared to allowing component structure to be defined in arbitrary JS is valid.
-
- Jan 2016
-
-
Quite a useful article summarizing the state of React and Angular 2 and to be fair, it does make criticisms of both sides.
-