When using provider string tokens, there’s a chance they collide with other third-party tokens. Angular has with the concept of opaque tokens, that allow us to make whatever token we use unique, so we don’t run into collision problems. In this lesson we’ll explore how they work.
What about using a Symbol
If we change the third-party to also use an opaque token How does Angular know which 'API_URL' token to use ?
<pre><code> providers: [ DataService, ConsoleService, { provideL LogDebugger, useFactory: (consoleService) => { return new LogDebugger(consoleService, true); }, deps: [ConsoleService] }, { provide: API_URL , useValue: 'http://localhost:4200/api'; }, THIRD_PARTY_PROVIDERS ] </code></pre>This is deprecated since Angular 4. They're recommending a switch to InjectionToken.