Guest User

Untitled

a guest
Jul 15th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. import { CustomDataService } from "../services/custom-data.service";
  2.  
  3. const template = require("./custom-data.component.html");
  4.  
  5. class CustomDataController {
  6. static $inject = ["customData"];
  7.  
  8. public data: string[] = [];
  9.  
  10. constructor(private _customData: CustomDataService) {}
  11.  
  12. public async $onInit(): Promise<void> {
  13. this.data = await this._customData.getData();
  14. }
  15. }
  16.  
  17. export class CustomDataComponent implements ng.IComponentOptions {
  18. public controller: any;
  19. public templateUrl: string;
  20.  
  21. constructor() {
  22. this.controller = CustomDataController;
  23. this.templateUrl = template;
  24. }
  25. }
Add Comment
Please, Sign In to add comment