consumerportal
Version:
mydna Custimised for you
46 lines (37 loc) • 1.29 kB
text/typescript
/// <reference path="../../../includes.ts" />
module app {
class Controller {
public static $inject = [
'$scope',
'$sce',
'userService'
];
constructor(
private $scope: angular.IScope,
public $sce: angular.ISCEService,
private userService: services.IUserService
) {
}
}
class Component {
public bindings: any = {
title: '<',
content: '<',
buttons: '<',
close: '<'
};
public template: string = `
<div>
<div><div ng-bind="vm.title"></div><div ng-click="vm.close(-1)"></div></div>
<div ng-bind-html="vm.$sce.trustAsHtml(vm.content)"></div>
<div>
<button ng-repeat="button in vm.buttons track by $index" ng-click="vm.close($index)" ng-class="button.className"><span ng-bind="button.label"></span></button>
</div>
</div>`;
public controller: any = Controller;
public controllerAs: string = 'vm';
}
angular
.module('app')
.component('modalNotification', new Component());
}