I need to use ng-repeat
(in AngularJS) to list all of the elements in an array.
The complication is that each element of the array will transform to ei
for a solution that really works
html
html stuff in here including inner repeating loops if you want
add an angular.js directive
//remove directive
(function(){
var remove = function(){
return {
restrict: "E",
replace: true,
link: function(scope, element, attrs, controller){
element.replaceWith('');
}
};
};
var module = angular.module("app" );
module.directive('remove', [remove]);
}());
for a brief explanation,
ng-repeat binds itself to the
element and loops as it should, and because we have used ng-repeat-start / ng-repeat-end it loops a block of html not just an element.
then the custom remove directive places the
start and finish elements with