
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
ngx-window-token
Advanced tools
This project was generated with Angular CLI version 9.
It is the same way how angular handle document. With this module, you can use WINDOW token just like DOCUMENT token.
return undefine if window is undefine. Before, it doesn't even inject WindowToken.
removed now-unnecessary NgxWindowTokenModule
, it will be inject into root module
change WindowTokenModule
-> NgxWindowTokenModule
You can get it on npm.
npm install ngx-window-token --save
1. npm i
2. npm run build
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 component
constructor(@Inject(WINDOW) _window) { }
For webpack / Angular CLI, it works as any other libraries. Please check demo folder for more help.
or clone this repo and run ng serve
FAQs
angular window inject token
We found that ngx-window-token demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.