Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.