Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-window-token

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-window-token

angular 2 window inject token

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Commitizen friendly travis build npm GitHub release npm

ngx-window-token

It is the same way how angular handle document. With this module, you can use WINDOW token just like DOCUMENT token.

Dependencies

  • Angular >=4.0.0

Install

You can get it on npm.

npm install ngx-window-token --save

Build project

1. npm i

2. npm run build

Usage

If you use SystemJS to load your files, you might have to update your config:

System.config({
    map: {
        'ngx-window-token': 'node_modules/ngx-window-token'
    }
});

In your module

 imports: [ BrowserModule, WindowTokenModule ]

In your component

  constructor(@Inject(WINDOW) _window) { }

For webpack / Angular CLI, it works as any other libraries. Please check demo folder for more help.

Example

plunker

Contributing

  1. Your commits conform to the conventions established here
  2. This project used commitizen and semantic-release to handle npm version from CI
    • run git add first to add your changes to staging
    • use npm run commit to commit, and CI will do the rest.
    • if changes contain breaking change, use BREAKING CHANGE keyword in the comment to trigger major release
    • before push to git and trigger CI, you can dry run npm run semantic-release locally to make sure the version number is push as expected.

Keywords

FAQs

Package last updated on 03 May 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc