docs: function (node, name, container, promises, parent, counter) {
  	var $old_element = jqlite(node), local_promises = [];
  
  	node = [ new NodeElement({ name : name }) ];
  	build_nodes(node[0], $old_element[0]);
  
  	collect_components(node, container, local_promises, parent, counter);
  
  	var promise = $q.all(local_promises).then(function () {
  		node = jqlite(node[0].compile('', ''))[0];
  		$old_element.replace_with(node);
  	});
  
  	promises.push(promise);
  }