Created
August 24, 2016 18:33
-
-
Save okiroth/8a1c4a6a8f35dbff5916fa9976260e33 to your computer and use it in GitHub Desktop.
This file contains hidden or 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