import { Tariff } from '../../common/entities/Quote'; export function TariffPanelDirectiveFactory() { return new TariffPanelDirective(); } class TariffPanelDirective implements ng.IDirective { restrict = 'E'; bindToController = true; controller = TariffPanelController; controllerAs = 'ctrl'; template = require('./TariffPanel.html'); scope = { tariff: '=', selectTariff: '&' } } class TariffPanelController { tariff: Tariff; // Callback provided in the directive attributes selectTariff: () => void; }