consumerportal
Version:
mydna Custimised for you
48 lines (38 loc) • 1.29 kB
text/typescript
/// <reference path="../../includes.ts" />
module app {
import IUser = services.IUser;
class Controller {
static $inject = [
'$scope',
'sportsService',
'user'
];
public details: any;
public selected: any;
public loaded: boolean = false;
public navigation: any[] = this.sportsService.navigation();
public tabs: any[] = [
{value: 'why', label: 'DNA Testing'},
{value: 'how', label: 'Report Creation'},
{value: 'trafficlights', label: 'Traffic Lights'},
{value: 'references', label: 'References'}
];
public tabValue: string = 'why';
constructor(
$scope: angular.IScope,
private sportsService: services.ISportsService,
public user: IUser
) {
$scope.$on('scienceTabChanged', (ev: any, tab: any) => {
this.tabValue = tab.value;
});
sportsService.details().then((value: any) => {
this.details = value;
this.loaded = true;
});
}
}
angular
.module('app')
.controller('sportsScienceCtrl', Controller);
}