Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
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.
BREAKING CHANGE: Support Angular >= 15 only
BREAKING CHANGE: Support Angular >= 13 only
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.