Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass template as a string or pass template based on a condition #6

Open
dhavaln opened this issue Aug 4, 2012 · 0 comments
Open

pass template as a string or pass template based on a condition #6

dhavaln opened this issue Aug 4, 2012 · 0 comments

Comments

@dhavaln
Copy link
Member

dhavaln commented Aug 4, 2012

Currently template can be given via a key only, for which template needs to be in DOM tree.

I need a way to pass template as an inline string like this:

var template1 = "Hi, {{name}}";
return template1;

Or based on a condition like this:

if(this.model.online){
    return 'online-template';
}else{
    return 'offline-template';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant