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
const template = require("./hello-world.component.html"); | |
interface IHelloWorldController extends ng.IScope { | |
data: string; | |
} | |
class HelloWorldController { | |
static $inject = ["$scope"]; | |
constructor(private _scope: IHelloWorldController) { | |
this.$onInit(); | |
} | |
public $onInit() { | |
this._scope.data = "Hello world!"; | |
} | |
} | |
export function HelloWorldComponent(): ng.IDirective { | |
return { | |
restrict: "E", | |
template: template, | |
controller: HelloWorldController | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment