Package Exports
- ngx-window-token
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ngx-window-token) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
This project was generated with Angular CLI version 9.
ngx-window-token
It is the same way how angular handle document. With this module, you can use WINDOW token just like DOCUMENT token.
Breaking Change after version 5.0.0
return undefine if window is undefine. Before, it doesn't even inject WindowToken.
Breaking Change after version 1.0.2
removed now-unnecessary NgxWindowTokenModule, it will be inject into root module
Breaking Change after version 1.0.0
change WindowTokenModule -> NgxWindowTokenModule
Dependencies
- Angular >=6.0.0
Install
You can get it on npm.
npm install ngx-window-token --saveBuild project
1. npm i
2. npm run buildUsage
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.
Example
or clone this repo and run ng serve
Contributing
- Your commits conform to the conventions established here