limitless.directive('uiWizardForm', [ '$compile', '$translate', function ($compile, $translate) { return { scope: false, priority: 3000, link: function ($scope, ele, attrs) { var startIndex = attrs.startIndex !== undefined ? parseInt(attrs.startIndex) : 0; ele.wrapInner('
'); var steps = ele.children('.steps-wrapper').steps({ headerTag: "h6", bodyTag: "fieldset", transitionEffect: "fade", titleTemplate: '0#index#. #title#', labels: { finish: $translate.instant('WIZARD_FINISH_BUTTON'), cancel: $translate.instant('WIZARD_CANCEL_BUTTON'), next: $translate.instant('WIZARD_NEXT_BUTTON'), previous: $translate.instant('WIZARD_PREV_BUTTON') }, onFinishing: function (event, currentIndex) { if ($scope.onFinishing !== undefined) return $scope.onFinishing(event, currentIndex); else return true; }, onCanceled: function (event) { if ($scope.onCanceled !== undefined) return $scope.onCanceled(event, currentIndex); else return true; }, onStepChanging: function (event, currentIndex, newIndex) { if ($scope.onStepChanging !== undefined) return $scope.onStepChanging(event, currentIndex, newIndex); return true; }, onInit: function () { $scope.wizardInit = true; }, startIndex: startIndex }); $compile(steps)($scope); } } } ]); limitless.directive('customRepeat', function($compile) { return { priority: 2000, restrict: 'A', compile: function(element){ element.attr('ng-repeat', element.attr('custom-repeat')) element.removeAttr('custom-repeat'); //this line is need for compilation of element debugger; var compile = $compile(element); return function(scope, element) { compile(scope); //linking scope } } } });