Created
July 15, 2018 21:09
-
-
Save ssougnez/76dbc34483c08a012198cc666b520864 to your computer and use it in GitHub Desktop.
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
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