Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- }
- }
Add Comment
Please, Sign In to add comment