Socket
Socket
Sign inDemoInstall

@nggondolas/global-tokens

Package Overview
Dependencies
9
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @nggondolas/global-tokens

Common utilities for consuming Web APIs from Angular


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Install size
101 kB
Created
Weekly downloads
 

Readme

Source

GlobalTokens

Usage

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;
    }
}

Keywords

FAQs

Last updated on 31 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc