Questions tagged [htmlbars]

HTMLBars is the EmberJS templating system replacement for Handlebars starting with v1.10.0

HTMLBars is the templating system replacement for starting with v1.10.0. You can check the source code here.

116 questions
1
vote
3 answers

Ember template helper get-value-with-key

Does Ember have any template helper "get-value-with-key" I found the below usage, but not sure what it does exactly ? {{get-value-with-key item optionValuePath}}
copenndthagen
  • 49,230
  • 102
  • 290
  • 442
1
vote
1 answer

how to add a class via binding in ember 2.0

I have a bootstrap button group in my Ember 2.2 app that looks like this:
1
vote
1 answer

Ember update causes promises in templates to not wait to resolve

I'm in the middle of an ember 1.12.1 -> 1.13.11 and ember data 1.0.0-beta.19.1 -> 1.13.15 update. I previously had a template: {{a-component parent=model.parent}} and a component parentChanged: on('init', observer('parent', function() { var…
Kelly Selden
  • 1,238
  • 11
  • 21
1
vote
1 answer

Emberjs link-to href test in integration component

I'm trying to test a link-to href property in an ember component. with ember 2.0 but when I render the component with renter hbs it renders this:

edwinallenz
  • 340
  • 3
  • 12
1
vote
0 answers

Increase in size of compiled templates.js in ember 1.11.3

Once we migrated to ember 1.11.3 from 1.10.1 my compiled templates.js file size increased from ~5MB to ~9MB, without even changing any template(.hbs) file or adding any hbs file. I'm using HTMLBars in my templates. Anyone know the reason for it?
1
vote
1 answer

How to bind action only under certain condition [Ember.js]

I just want to know, is there some way I can achieve the below purpose. Of course, it can be done in action method. I just think it…
glenlivet1986
  • 260
  • 3
  • 12
1
vote
1 answer

Ember bind attribute using truth helper

I'm using Ember v1.13 and would like to render the checked attribute of an input element based on the result of an ember-truth-helpers expression. The following DID NOT work for me:
sammy34
  • 5,312
  • 5
  • 29
  • 42
1
vote
1 answer

Ember HTMLBars inline combined conditions

When trying to have a simple conditional style-class assignment in HTMLBars with Ember 1.13, the following code does a great job: {{#each items as |item|}}
  • L-Ray
    • 1,637
    • 1
    • 16
    • 29
  • 1
    vote
    1 answer

    Ember template - failed to execute 'createElement' on 'Document': The tag name provided is not a valid name

    I have 2 models loaded into my route and am trying to render a component for each into the same template as below: {{#each fav in favs}} {{user-fav fav=fav}} {{/each}} {{#each tag in tags}} {{user-tag tag=tag}} {{/each}} The favs models load…
    1
    vote
    0 answers

    Ember Apply JSON to Template in JavaScript

    I am using jQuery DataTable but this can apply to other scenarios as well. DataTable has a child row feature where you can use HTML in string form to render a child row when the parent row is expanded. The d in the sample is the JSON object…
    Mark Tucker
    • 434
    • 5
    • 13
    1
    vote
    1 answer

    Ember, rendering content in a dynamic template

    I'm running into a bit of a brick wall with how to render content inside some dynamic HTML content which I don't control, with Ember v1.13.1. In this particular scenario, I'm getting a navigation head, and navigation foot from a service call and…
    Richard Rout
    • 1,296
    • 1
    • 15
    • 28
    1
    vote
    1 answer

    Outputting controller variable in Ember.js HTMLbars template

    I was following with along the Ember Guides: Defining Your Routes and added a customized index route in my Ember app; which sets a controller title property: // app/routes/index.js import Ember from 'ember'; export default Ember.Route.extend({ …
    max
    • 96,212
    • 14
    • 104
    • 165
    1
    vote
    1 answer

    EmberJS - object proxying is deprecated - accessing property of a controller in template

    I'm trying to understand certain peculiarity. Setting xxx property and iterating #each in one controller works, while seemingly same operation with yyy #each doesn't... I'm including highlights of the code and the runnable code…
    Mars Robertson
    • 12,673
    • 11
    • 68
    • 89
    1
    vote
    1 answer

    emberjs add code on the fly, after template render

    In emberjs, you can add code to your template file: {{input type="text" value=color}} the template then renders. But the question is, how can you add this dynamically after the template renders? For example, I want to add a button, to generate…
    Matt
    • 1,811
    • 1
    • 19
    • 30
    1
    vote
    3 answers

    Typeahead.js with Ember's HTMLBars

    We've been using the Typeahead.js library in our Ember app (via this addon) with success on Ember versions prior to 1.10, but the upgrade to Ember 1.10 is causing us problems. Until now we've had success compiling templates that are passed into the…
    Dhaulagiri
    • 3,281
    • 24
    • 26