That line just clears the #main DIV node, which contains the template itself (which makes things easy from the designer's perspective). If you omit that line, you can set the parent template node to be invisible instead.

By on 4/18/2015 6:53 AM ()

In fact, the templating type provider parses an HTML file during compilation and generates JavaScript code that creates corresponding DOM nodes. So the HTML itself does not need to be in the document at run time for the application to work. For example in this case, we use a separate template.html which is only used during compilation, and never served.

By on 4/18/2015 7:16 AM ()

Right, you can always put templates in separate files. For simpler apps and those where markup is coming from a designer, in-place templates are the easiest, though.

By on 4/18/2015 9:23 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper