What is a DI token?
A DI token is a lookup token associated with a dependency provider in dependency injection system. The injector maintains an internal token-provider map that it references when asked for a dependency and the DI token is the key to the map. Let's take example of DI Token usage,
const BASE_URL = new InjectionToken() < string > 'BaseUrl';const injector = Injector.create({providers: [{ provide: BASE_URL, useValue: 'http://some-domain.com' }],});const url = injector.get(BASE_URL);
October 02, 2022
485
Read more
What is Angular Framework?
November 04, 2022
AngularWhat is a Angular module?
November 03, 2022
AngularWhat are the steps to use animation module?
October 31, 2022
Angular