Skip to content

Instantly share code, notes, and snippets.

@panakh
Created October 18, 2013 16:25
Show Gist options
  • Save panakh/7044044 to your computer and use it in GitHub Desktop.
Save panakh/7044044 to your computer and use it in GitHub Desktop.
var ItineraryWizardComponent = Ember.Component.extend({
cities: ['Rome'],
steps: (function() {
var data = [];
$.each(this.cities, function(index, city) {
data.push({
name: 'step' + ++index,
title: 'What are you going to do in ' + city
})
});
return data;
}).property('cities.@each')
{{#each steps}}
<li data-target="{{name}}">
<span class="step">2</span>
<span class="title">{{title}}</span>
</li>
{{/each}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment