Created
November 9, 2015 09:07
-
-
Save daviddt/c068daa600291939f69f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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