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

get array element based on a property in emberjs template

I have an array someArray and I try to get its nth element, where n based on row's property. {{#each data as |row|}} {{someArray.[row.property]}} {{/each}}
user3568719
  • 1,036
  • 15
  • 33
0
votes
1 answer

Passing template html as attribute to Ember component

Right now I have an Ember component that generates markup for a modal popup. I'd like to pass some HTML to the component (in the form of component attributes) that will be assigned to the modal's content body. Something like this would be…
mfink
  • 1,309
  • 23
  • 32
0
votes
2 answers

accessing dynamic input values in ember #each block in ember

I'm having issues accessing input values within my component. I'm trying to dynamically create value bindings in my templates and accessing in the conponent.js file using this.controller.get("pst"+id) however the result is underfined. Using Ember…
goofiw
  • 607
  • 5
  • 16
0
votes
1 answer

ember-cli-htmlbars plugins not processing in-repo addon templates

I'm using a plugin for ember-cli-htmlbars in an addon to process the template ASTs. It works correctly for templates in my addon's dummy application. However, the dummy application has an in-repo addon that contains templates in addon/templates/.…
Zack The Human
  • 8,373
  • 7
  • 39
  • 60
0
votes
0 answers

How to display html string using Em.String.htmlSafe?

My requirement is list all customers one by one in newline. let customers = [ {id: 1, name: "a"}, {id: 2, name: "b"}] let displayString = customers.mapBy("name").join("
"); displayString = Ember.String.htmlSafe(displayString); Now I am doing…
NkS
  • 1,270
  • 1
  • 18
  • 28
0
votes
2 answers

Ember, generating URL `url-to`?

I would like to generate a URL to a resource and show it to the User. I found the link-to but I don't want the whole element but only the URL. Something like: {{#url-to 'photos.show' photo}}
fguillen
  • 36,125
  • 23
  • 149
  • 210
0
votes
1 answer

Ember, how to reuse same "partial" for "index" and for "show"

This is the simplified version of my situation: {{#each model as |chart|}} {{partial "charts/chart"}} {{/each}} {{partial "charts/chart"}} {{attrs.canDelete}}