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
2
votes
2 answers

Ember: control component behavior based on content of 'yield'

Imagine I have an Ember component which for purposes of this question merely wraps its content in a div, adding a bit of text:
Value is: {{yield}}
So I call it as {{#component}} {{model.text}} {{/component}} And…
user663031
2
votes
0 answers

Ember.Select doesn't change selected value

I've got a select-box with categories inside my post-editor. Ever since using the category permalink as its primary-key the selected value inside the select-field doesn't change anymore visible. However the value is updated correctly in the…
Hedge
  • 16,142
  • 42
  • 141
  • 246
2
votes
1 answer

How to compile inline HTMLBars templates?

I have an inline template (template in JavaScript) that I used to compile like so (where temp is a Handlebars string): var template = Handlebars.compile(temp); template({model: results}); // Gets the HTML I'm trying to use HTMLBars instead, but…
dwhite
  • 1,979
  • 1
  • 24
  • 43
2
votes
1 answer

How to replace the handlebars with htmlbars in Ember CLI app?

I am facing the following issue after upgrading the Ember and Ember data to the canary versions. Cannot set property 'compilerInfo' of undefined I found the discussion about the issue in Ember CLI…
Soundar Rathinasamy
  • 6,658
  • 6
  • 29
  • 47
2
votes
0 answers

Live Handlebars / HTMLBars templates

I'm looking for an easy, reliable way to lazy load templates in Ember 1.10 but can't find much. This SO question and this discuss.emberjs both ask something similar to what I need for this application. I've set up Grunt with grunt-ember-templates to…
Chris Bornhoft
  • 4,195
  • 4
  • 37
  • 55
1
vote
1 answer

Add AND condition in Handlebars/HtmlBars template

In my Ember project, I have a button as below; {{my-button label="Add" enabled=(lt gridItems.length maxRecordsInGrid)}} Currently I have the "enabled" property based on gridItems.length < maxRecordsInGrid I want to add a 2nd condition to this i.e.…
copenndthagen
  • 49,230
  • 102
  • 290
  • 442
1
vote
1 answer

Render component with concat helper

Is there a way to render component in HTMLBars as argument passed in concat helper? I have fa-icon ember component and my custom component that displays label. I need to display it like: {{my-simple-button label=(concat (fa-icon "pencil") " " (t…
1
vote
1 answer

How to compile glimmer2 template for Ember 2.8+

Recently we have started a wide scale upgrade of our EmberJS system. And currently we are at 2.11 version of ember. With EmberJS 2.11 Ember.HTMLBars.template and Ember.Handlebars.template all come via a single template function and expect JSON…
Dimi
  • 111
  • 5
1
vote
1 answer

how to write nested if in ember htmlBars

how to write nested if conditition in ember htmlBars
below is ember verison DEBUG: Ember : 1.13.0 Ember Data : 1.13.7 jQuery : 1.11.1
dilip kumar
  • 377
  • 4
  • 13
1
vote
0 answers

Could I call action helper from custom helper?

I use ember.js v1.13.0 and have template helper import Ember from 'ember'; export default Ember.Handlebars.makeBoundHelper(function(data, recordType, options) { data = data || ''; if (recordType == 12) { //not escaped …
Dmitro
  • 1,489
  • 4
  • 22
  • 40
1
vote
3 answers

Ember.HTMLBars.compile is undefined in Ember 2.7

In our application we use the template compiler at runtime by calling Ember.HTMLBars.compile with a handlebars template. Example code: let myTemplate = `{{foo}}`; application.register(`template:my-template`,…
Lebbers
  • 107
  • 7
1
vote
2 answers

Ember js, HTMLbars: use component as param of a component

I want to to something like this: {{component-one title=(component-two paramX paramY)}} the component helper does not work here, I tried this {{component-one title=(component 'component-two' params)}} I also tried to make a helper rendering my…
PowPi
  • 164
  • 1
  • 1
  • 10
1
vote
0 answers

Is HTMLBars stable enough to use in production?

I have a project that uses Handlebars (not with Ember) and I am interested in moving to HTMLBars. Looking at the repository ReadMe and Googling around it is not clear if this project is stable enough yet to use in production. It is now considered…
bshack
  • 1,891
  • 1
  • 21
  • 27
1
vote
1 answer

Using precompiled Handlebars templates in Ember 2 project

I'm need to use some precompiled handlebars templates in my ember project along with my normal components and templates. I've loaded the precompiled templates in my ember-cli-build.js file using app.import(). The precompiled templates are now…
goofiw
  • 607
  • 5
  • 16
1
vote
1 answer

Proper syntax for Handlebars expression within block helper. Specifically {{#link-to}}

What is the proper syntax to use an objects property as the 'link-to' or other value in a handlebars expression? For example, I want to use {{page.slug}}
sheriffderek
  • 8,848
  • 6
  • 43
  • 70