Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import { CustomDataService } from "../services/custom-data.service";
const template = require("./custom-data.component.html");
class CustomDataController {
static $inject = ["customData"];
public data: string[] = [];
constructor(private _customData: CustomDataService) {}
public async $onInit(): Promise<void> {
this.data = await this._customData.getData();
}
}
export class CustomDataComponent implements ng.IComponentOptions {
public controller: any;
public templateUrl: string;
constructor() {
this.controller = CustomDataController;
this.templateUrl = template;
}
}
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.