import {Component, inject, InjectionToken} from '@angular/core';
import {USER_AGENT} from '@nggondolas/global-tokens';
export const GET_BROWSER = new InjectionToken<string>('User Agent', {
providedIn: 'root',
factory: () => inject(USER_AGENT).toLowerCase()
});
@Component({})
export class AppComponent {
constructor(@Inject(GET_BROWSER) private readonly userAgent: string) {}
get foo(): string {
return this.userAgent;
}
}
-
Notifications
You must be signed in to change notification settings - Fork 0
License
NgGondolas/global-tokens
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published