![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
angular-events
Advanced tools
Only two methods: .broadcast() and .on(), without native upwards(broadcast)/downwards(emit) logic and scope mess.
Works great with Angular 1.6.*, should work with lower versions as well.
npm install angular-events --save
<script src="node_modules/ng-events/dist/ng-events.min.js">
Be sure path to node_modules is correct
angular.module('yourApp', ['ngEvents']);
angular.module('yourApp').factory('Service1', ['$events', function($events) {
$events.broadcast('SOMETHING_HAPPENED');
}]);
angular.module('yourApp').factory('Service2', ['$events', function($events) {
$events.on('SOMETHING_HAPPENED', function() {
console.log('Something happened, got it!');
})
}]);
You can also pass data when broadcasting:
$events.broadcast('SOMETHING_HAPPENED', {info: 'some info'});
and get it:
$events.on('SOMETHING_HAPPENED', function(data) {
console.log('Something happened, got it! And here is what we know: ' + data.info);
});
$events.on(['SOMETHING_HAPPENED', 'SOMETHING_ANOTHER_HAPPENED'], function() {
console.log('We know that something or something another happened. And it should not bother us that we do not know which specific event was fired (by design means)!');
});
$events.on('SOMETHING_HAPPENED', function ()
{
console.log('this will have default priority 500');
});
$events.on('SOMETHING_HAPPENED', function ()
{
console.log('this will have priority 1000');
}, 1000);
$events.on('SOMETHING_HAPPENED', function ()
{
console.log('this will have priority 1001 (because push is used)');
});
$events.on('SOMETHING_HAPPENED', function ()
{
console.log('this should be shown second and...');
}, 20);
$events.on('SOMETHING_HAPPENED', function ()
{
console.log('This should be shown first and...');
}, 10);
FAQs
Very simple angularjs (angular 1) events
The npm package angular-events receives a total of 2 weekly downloads. As such, angular-events popularity was classified as not popular.
We found that angular-events 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.