Last active
April 6, 2016 14:10
-
-
Save elgervb/dfe4acf0c34002f0022c8d600db3853e to your computer and use it in GitHub Desktop.
TypeScript angular 1.5 Component
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
class MyComponentController { | |
static $inject = ['AnyService']; | |
constructor( private service: AnyService) {} | |
} | |
class MyComponent implements ng.IComponentOptions { | |
public bindings: { [binding: string]: string }; | |
public controller: string | Function; | |
public templateUrl: string | Function; | |
constructor() { | |
this.bindings = {}; | |
this.controller = MyComponentController; | |
this.templateUrl = '/tpl/mycomponent.html'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment