(function () {
'use strict';
/*
*/
var name = 'adMultiLang';
angular.module('app.directive')
.directive('adMultiLang', ['staticData', function (staticData) {
return {
replace: true,
templateUrl: 'directive/' + name + '/' + name + '.html',
scope: {
name: '@adMultiLang',
label: '@adMultiLangLabel'
},
transclude: true,
require: '^form',
link: function (scope, element, attr, ctrl) {
scope.ctrl = ctrl;
scope.languages = staticData.languages;
scope.languagesNames = staticData.languagesNames;
scope.parent = scope.$parent;
}
};
}]);
// angular.module('app.directive')
// .directive('adMultiLangTransclude', [function () {
// return {
// link: function (scope, element, attr, ctrl, transcludeFn) {
// transcludeFn(function (clone) {
// // todo: add common attributes to input
// element.empty();
// element.append(clone);
// });
// }
// };
// }]);
})();