(function () { "use strict"; var name = 'adUserProfileForm'; angular.module('app.directive') .directive('adUserProfileForm', ['$window', '$cookies', 'cfg', 'staticData', 'user', function ($window, $cookies, cfg, staticData, user) { return { templateUrl: 'directive/' + name + '/' + name + '.html', scope: {}, controller: 'BaseFormController', link: function (scope, element, attributes, controller) { cfg.debug && console.log(name); controller.bridge = user; scope.update = function () { if (scope.userProfileForm.$invalid) { return; } controller.formAction('update', scope.data); }; controller.formAction('read'); } }; }]); })();