UNPKG

consumerportal

Version:

mydna Custimised for you

45 lines (39 loc) 1.24 kB
/// <reference path="../../includes.ts" /> module app { class AlcoholResult { public tab: string; public color: string; constructor( public title: string, public description: string, public tabs: any[]) {} } class Controller { public details: any; public selected: any; public loaded: boolean = false; public navigation: any[] = this.alcoholService.navigation(); public coloursets: any = { ADH1B: { '*1*1': 'green', '*1*2': 'orange', '*2*2': 'red'}, ALDH2: { '*1*1': 'green', '*1*2': 'orange', '*2*2': 'red'} }; static $inject = [ '$scope', 'alcoholService', 'user' ]; constructor( $scope: angular.IScope, private alcoholService: services.IAlcoholService, public user: services.IUser ) { alcoholService.details().then((value: any) => { this.details = value; this.loaded = true; }); } } angular .module('app') .controller('alcoholResultsCtrl', Controller); }