aspect.js-angular
TypeScript icon, indicating that this package has built-in type declarations

0.0.9 • Public • Published

Angular bindings for aspect.js

This library provides bindings to the Angular ElementInjector when used together with aspect.js.

Demo

import {Router, Injectable} from '@angular/router';
import {beforeMethod, Metadata} from 'aspect.js';
import {Wove} from 'aspect.js-angular';
 
class SampleAspect {
  @beforeMethod({
    classNamePattern: /^Bar$/,
    methodNamePattern: /baz$/
  })
  logger(meta: Metadata) {
    meta.woveMetadata.injector.get(Router).navigate(['Home']);
  }
}
 
@Wove()
@Injectable()
class class Bar {
  baz() {
    // method content
  }
}

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.9
    2
    • latest

Version History

Package Sidebar

Install

npm i aspect.js-angular

Weekly Downloads

2

Version

0.0.9

License

MIT

Last publish

Collaborators

  • mgechev