I am learning amber and i have a question: where should i put my template files? Assume that I'm using the requirejs to make my application modular. If I define my My app works properly but if I want to move any other file to my Since the string determining the name of the template to provide the basically < / P> li> Hope it helps. index.html starter kit:
index template in my project, say
js / Templates / index.html How do I tell Amber, what is the template in that directory? Do I have to use ideas in this matter? The root is the
renderTemplate method, but I do not know how to ask the template to take it from the directory:
define (['amber', 'text! Templates / Index.html html, function (amber, index template) {var index root = amber root extension ({rendertippler: function () {this.render (indexTemplate); // clearly it is not solution, not me Know how to specify index.}, Model: function () [returns [red ',' blue ',' Yellow '];}}); index root;
renderTemplate method is waiting I do not know how to tell Amber, that the template is actually in any other file, not in the
index.html of the application, but in the
template / index / P>
need.js for your templates There is no need to use the
renderTemplate to crack, if you do not need to do extra stuff in your view, then you do not even need to define the ideas you have in addition to your
In index.html, you can separate your templates defined in different handler files
*. HBS or
*. Handlebar and load in this template
No comments:
Post a Comment