Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Is there a way to write {{a()}} or {{foo.attr("bar")}} in Mustache or Handlebars?

$
0
0

I found that if `a` is a `can.compute()`, we would write `a` in Mustache, while in EJS, we would write the form that makes more sense, as a().

Examples:

And then if `foo` is a `new can.Observe({bar: 123})`, then in Mustache, we would write `foo.bar`, while in EJS, we would again write what happens in JavaScript, as foo.attr("bar").

Examples:

Is that the standard or any other way to write it?  Is there a way to write a() or foo.attr("bar") in Mustache too?


Viewing all articles
Browse latest Browse all 3491

Trending Articles