Skip to content

Instantly share code, notes, and snippets.

@daviddt
Created November 9, 2015 09:07
Show Gist options
  • Save daviddt/c068daa600291939f69f to your computer and use it in GitHub Desktop.
Save daviddt/c068daa600291939f69f to your computer and use it in GitHub Desktop.
export default class ExampleDirective {
constructor() {
this.template = '<div>{{ctrl.name}}</div>';
this.restrict = 'E';
this.scope = {};
this.controller = ExampleDirectiveController;
this.controllerAs = 'ctrl';
this.bindToController = true;
}
// Directive compile function
compile() {
}
// Directive link function
link() {
}
}
// Directive's controller
class ExampleDirectiveController {
constructor () {
this.name = 'david';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment