consumerportal
Version:
mydna Custimised for you
43 lines (35 loc) • 1.2 kB
text/typescript
/// <reference path="../../includes.ts" />
module app {
class Controller {
static $inject = [
'$scope',
'$sce',
'alcoholService',
'user'
];
public details: any;
public selected: any;
public loaded: boolean = false;
public navigation: any[] = this.alcoholService.navigation();
public text: string;
public tabValue: string = 'why';
constructor(
$scope: angular.IScope,
private $sce: angular.ISCEService,
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.text = $sce.trustAsHtml(alcoholService.getConsideration().Recommendation);
this.loaded = true;
});
}
}
angular
.module('app')
.controller('alcoholConsiderationsCtrl', Controller);
}