Guest User

Untitled

a guest
Aug 24th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. export default class ExampleDirective {
  2. constructor() {
  3. this.template = '<div>{{ctrl.name}}</div>';
  4. this.restrict = 'E';
  5. this.scope = {};
  6.  
  7. this.controller = ExampleDirectiveController;
  8. this.controllerAs = 'ctrl';
  9. this.bindToController = true;
  10. }
  11.  
  12. // Directive compile function
  13. compile() {
  14.  
  15. }
  16.  
  17. // Directive link function
  18. link() {
  19.  
  20. }
  21. }
  22.  
  23. // Directive's controller
  24. class ExampleDirectiveController {
  25. constructor () {
  26. this.name = 'david';
  27. }
  28. }
Add Comment
Please, Sign In to add comment