8 Matching Annotations
  1. Feb 2017
    1. how it uses zones

      Does anyone have an authoritative link for this concept of zones and how they work? It'd be much appreciated.

    2. 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?

    3. 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?

  2. Jan 2017
    1. 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.

    2. 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.

    3. 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.

  3. Mar 2016
    1. 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.

  4. Jan 2016