App = Ember.Application.create({
LOG_TRANSITIONS: true,
LOG_TRANSITIONS_INTERNAL: true,
LOG_VIEW_LOOKUPS: true,
LOG_ACTIVE_GENERATION: true
});
<script type="text/x-handlebars" data-template-name='application'>
<div class="navbar">
<div class="navbar-inner">
<a class="brand" href="#">Bloggr</a>
<ul class="nav">
<li>{{#link-to 'posts'}}Posts{{/link-to}}</li>
<li>{{#link-to 'about'}}About{{/link-to}}</li>
</ul>
</div>
</div>
{{outlet}}
</script>
App.Router.map(function() {
this.resource('about');
this.resource('posts', function() {
this.resource('post', { path: ':post_id' });
});
});
App.ApplicationRoute = Ember.Route.extend({
model: function() {
return this.store.find('stackFlow', DiscoverySettings.stackFlow);
}
});
App.OptionController = Ember.ObjectController.extend({
needs: ['stacks'],
selected: function(){
return this.get('controllers.stacks.model').contains(this.get('model'));
}.property('controllers.stacks.model', 'model')
});
MyView = Ember.View.extend({
classNameBindings: ['propertyA', 'propertyB'],
propertyA: 'from-a',
propertyB: function() {
if (someLogic) { return 'from-b'; }
}.property()
});
<li id="ember3402" class="ember-view option iphone">
<figure class="option-figure">
<img src="https://cdn.gazelle.com/gz_attachments/product_image/230/949/3/iphone_5s_16.jpg" data-bindattr-2="2" class="option-image">
<figcaption class="option-name"><script id="metamorph-8-start" type="text/x-placeholder"></script>iPhone<script id="metamorph-8-end" type="text/x-placeholder"></script></figcaption>
</figure>
</li>
person.get('name');
person.set('name', 'jack');
var person = people.findBy('name');
person.get('address.city');