"use strict"; /** * Created by andey on 26-12-2016. */ (function () { 'use strict'; angular.module('releaseModule') .directive('releaseRisks', ['events', 'tabIds', function (events, tabIds) { return { restrict: 'E', replace: true, templateUrl: 'views/release/release-risks.html', link: function (scope) { scope.$watch(tabIds.wizard.risks + '.$invalid', function (invalid) { if (typeof invalid !== 'undefined') { scope.$emit(events.RELEASE_WIZARD_FORM_STATE, { name: tabIds.wizard.risks, invalid: invalid }); } }); scope.$watch(tabIds.wizard.risks + '.$dirty', function (dirty) { if (typeof dirty !== 'undefined') { scope.$emit(events.RELEASE_WIZARD_FORM_STATE, { name: tabIds.wizard.risks, dirty: dirty }); } }); } }; } ]); })();