tabulation fixes

This commit is contained in:
Szekeres Bálint
2018-01-08 02:49:44 +01:00
parent dd68346e29
commit fe9c15fc1f
11 changed files with 46 additions and 27 deletions

View File

@@ -127,6 +127,19 @@
// INIT //
//////////
$scope.setDataFromHash();
})
.directive('ngIncludeTabs', function () {
return {
require: 'ngInclude',
restrict: 'A',
link: {
pre: function preLink(scope, iElement, iAttrs, controller) {
var tabs = parseInt(iAttrs.ngIncludeTabs || 0);
controller.template = controller.template.replace(/^(.*)$/mg, '\t'.repeat(tabs) + '$1').replace(/\s*$/, '');
console.log(controller);
},
},
};
});
})();