/** * @ngdoc fbModel * @name fasit.directives.#fbModel * @fbModel * * @description * Directive lägger på ng-model och lite annat smått och gått * */ // OBS! fb-model ska inte migreras till angular! Prata med frha om du är osäker på hur detta ska migreras fbDeprecatedFile('fbModel'); angular.module('fasit') .directive('fbModel', ['$compile', function ( $compile: ng.ICompileService) { 'use strict'; var link = function (scope, element, attrs) { fbDeprecated('fbModel'); $compile(element[0])(scope); }; var compile = function (el, attrs) { el.attr('ng-model', attrs.fbModel + '.value'); el.attr('fb-change-track', ''); el.attr('track', attrs.fbModel); el.removeAttr('fb-model'); return link; } return { restrict: 'A', compile: compile, }; }]);