Handlebars is a template library for JavaScript.
0
votes
0answers
9 views
Using Handlebars.js with StackMob
What I'm trying to do is when the page is loaded it will show the user a list of all their "contacts". There is a fair bit of code so I put it all HERE and below is just the load method.
...
0
votes
1answer
16 views
Calling a controller method whenever the value of a {{input}} Ember Handlebars helper changes
Ember 1.0.0 RC3 provides a Handlebars helper named {{input}}.
Instead of merely updating a String property in the underlying controller, I would like to additionally call a method on the underlying ...
0
votes
1answer
19 views
Javascript Binding Templates to Data
I really like handlebars.js templates, but I want to hook up data binding to update the template when the data changes. I already know how to do something like this:
var users = ...
0
votes
1answer
7 views
handlebar register helper to do a mobile check
Hi I am trying to switch templates based on a handlebar helper method
Handlebars.registerHelper("isMobile", function(){
return typeof window.ontouchstart === "object";
});
and in template
...
0
votes
0answers
19 views
Converting Handlebar Template to Knockout Template
I used jQuery and handlebars.js to build template for my JSON data. I had done that successfully & i have no problem with handlebars.js
Some how i came to know about http://knockoutjs.com/ an i ...
0
votes
1answer
41 views
Do not reload entire template
I'm working with the Meteor Wordplay example right now. The project I have going is at https://github.com/ajcrites/meteor-wordplay
One feature that I wanted to add was not showing duplicate words ...
0
votes
1answer
19 views
Need to add a custom option in Ember Select
How can I include a custom option (say, Quick Create) after the prompt in an Ember Select (with optgroups) ?
For example: I want my options in ember select to look like this:
Select
Add
Group1
...
0
votes
1answer
29 views
How do I get a detail view template to render in emberjs?
I'm new to EmberJs and I'm trying to do something as simple as showing a detail view after selecting an item from a list.
I've set up this jsfiddle
In the renderTemplate function of my route I'm ...
-1
votes
0answers
23 views
replace handlebar/template using knockoutjs
I am working on SPA.My task is to find which template/Handlebar is appended/executing in current window using knockout.js. And replace that handlebar/template with another template programmatically.
...
0
votes
3answers
40 views
JavaScript: unable to access object properties
I'm having trouble accessing the properties of a simple object.
This is what I get when I run alert(JSON.stringify(user)):
{"username": "david", "biography": "Hello world."}
But this is what I get ...
0
votes
0answers
11 views
Handlebars helper to return image height (width * ratio) returns NaN
I am using Handlebarz to load pictures with some text. I need to be able to specify the height of each image in order for the images to not overlap when they are drawn on the screen.
I have ...
0
votes
2answers
36 views
Setting Handlebars Attribute by Model Property
I am trying to set the class of a <tr> to either #warning or #success depending on the percentFree attribute of my Server Model. This is my Handlebar template:
<script ...
0
votes
2answers
28 views
General structure of a Backbone application using Handlebars
Here's a basic outline of what's going on in my Backbone application:
The router creates a new Profile view and passes in the username.
When the new Profile is initialized, it creates a new User ...
0
votes
2answers
42 views
How to use handlebars.js to populate cells within rows
I'm trying out ember.js/handlebars.js for the first time, and although it's very straightforward, I have a simple use case that I can't figure out.
With the following data:
var columns = ['col2', ...
0
votes
0answers
18 views
If statement within another if statement in Handlebars templates
These are all objects which I am passing to the handlebars template.
self.template = template({ data: self.model, lang:self.lang, page:self.mainPage, subpage:self.param });
Then inside foreach ...