UNPKG

consumerportal

Version:

mydna Custimised for you

47 lines (38 loc) 1.36 kB
/// <reference path="../../includes.ts" /> module app { class Controller { static $inject = [ '$scope', 'alcoholService', 'user' ]; public details: any; public selected: any; public loaded: boolean = false; public navigation: any[] = this.alcoholService.navigation(); public tabs: any[] = [ {value: 'metabolism', label: 'Metabolism'}, {value: 'side-effects', label: 'Side Effects'}, {value: 'dependence', label: 'Dependence'}, {value: 'references', label: 'References'}, {value: 'evidence-rating', label: 'Evidence Rating System'} ]; public tabValue: string = 'metabolism'; constructor( $scope: angular.IScope, private alcoholService: services.IAlcoholService, public user: services.IUser ) { $scope.$on('scienceTabChanged', (ev: any, tab: any) => { this.tabValue = tab.value; }); alcoholService.details().then((value: any) => { this.details = value; this.loaded = true; }); } } angular .module('app') .controller('alcoholScienceCtrl', Controller); }