Tag: services
-
Video – Simplifying Dependency Injection and Services in Angular, ng-India Webinar recording
In this webinar, you learn about Tree shakabale service Singleton service Various provideIn options such as forRoot, any Providers useClass, useFactory, useValue, useExisting Global Error Handling Services in lazy loaded modules For more such videos subscribe to the channel here : https://www.youtube.com/c/geek97
-
When to use viewProviders in Angular – Simplified
I have often seen developers are confused about viewProviders property of the @Componnet decorator. This post explains to you about the viewProviders option. The viewProviders defines the set of injectable objects that are visible to its view, DOM children. They are not visible to the content children. At the component level, you can provide a service in two ways: Using the providers array Using the viewProviders array.…
-
How to use useClass with Tree Shakable Services in Angular
Recently, I was asked that how can we use providers such as useClass inside a Tree Shakable service? By default, Angular services are tree shakable, which means if the application does not use them, they are not part of the final bundle. So, if you create a service using CLI as, ng g s Log…
-
Do Angular useExisting providers create a new object of service?
Short answer is NO, the useExisting provider use object created by other tokens. Read on, To learn more about such concepts, join a free webinar on Saturday, 20 June 4 PM IST. RSVP here: https://www.meetup.com/Geek97/events/271292371/ In Angular, providers determine how an object of a particular token gets created. That means whether Angular creates a new…
-
Video- Simplifying Dependency Injection, Services, and Providers in Angular
This video explain DI, Services, and Providers in Angular
-
Simplifying Different Types of Providers in Angular
An Angular Service provider delivers a runtime version of a dependency value. Therefore, when you inject a service, the Angular injector looks at the providers to create the instance of the service. It is the provider that determines which instance or value should be injected at the runtime in component, pipes, or directives. There are…