mercredi 24 août 2016

Get helper in hbs when getting nested object

suppose I have the following objects:

image: {
  size: {
    l: {
      url: 'l.jpg',
    },
    m: {
      url: 'm.jpg',
    },
    s; {
      url: 's.jpg',
    }
  }
},
mySize: 'm'

If I want to get corresponding image url in my template, how should I do that? I tried:



but it does not work. Thank you.




Aucun commentaire:

Enregistrer un commentaire