Using $scope.$apply() with External Template

I am using external template where the content property of the template links to a visible container. I also have a datatable that I need to update some of its content.

I managed to figure out how to update the datatable from angular controller by wrapping my function with $scope.$apply(). However, this works without using the external template. With the external template the application does not run and I get the following error:

angular.js:13424
TypeError: Failed to execute ‘appendChild’ on ‘Node’: parameter 1 is not of type ‘Node’.

I suppose that is because the external template is not part of webix-ui. If you comment line 21 in the code snippet below, the datatable content changes without errors.

Note: the reason for the external template because I am using openseadragon which requires element ID to be initialized.

Simplified code snippet can be found in the link below. I appreciate any help.

http://webix.com/snippet/fc56892a

Thank you

Any help or suggestions would great.

content view moves the node into the webix layout, which removed it from the dom. If you want to make a copy, you can use template:“html->slice_viewer”

http://webix.com/snippet/c5329307

or, you can use the existing code, but use Webix API to change the info content.

http://webix.com/snippet/87ae2884

Great. Thank you for the response. I read about “html->” but I did not understand that it makes a copy.

Great, thank you very much.