Just a thing I try to do that would really simplify my life right now.
How can I do that :
This is my view in app file
window.ArtView = B
That's wrong. Think about the template as a string, html markup. You get it and replace some parts of it with the actual data. If you want to do some DOM manipulation they should be made after that. Let us know what you want to do in callFunction and we may guide you to the right place for that logic.