Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed angular element children selector usage
  • Loading branch information
aklinkert committed Nov 24, 2015
commit b3692cfddcaee2f7fc7c8bcc683703c07370ae8f
7 changes: 6 additions & 1 deletion dist/schema-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -2609,7 +2609,12 @@ angular.module('schemaForm')
childScope.schemaForm = {form: merged, schema: schema};

//clean all but pre existing html.
element.children(':not(.schema-form-ignore)').remove();
// use vanillajs api to identify elements to delete
Array.prototype.forEach.call(element[0].children, function(child) {
if (([' ', child.className, ' '].join('')).indexOf(' schema-form-ignore ') === -1 && child.querySelectorAll('[sf-insert-field]').length === 0) {
angular.element(child).remove();
}
});

// Find all slots.
var slots = {};
Expand Down
Loading