Skip to main content

Alexey Tarasevich

Alexey Tarasevich's Public Library

  • This tells the my-button component that it should send the showUser action when it triggers its primary action.
  • This tells the my-button component that it should send the showUser action when it triggers its primary action
  • <button {{action "confirm"}}>Click again to confirm</button>

  • App.PostSummaryComponent = Ember.Component.extend({  actions: {  toggleBody: function() {  this.toggleProperty('isShowingBody');  }  } });

  • App.NavigationBarComponent = Ember.Component.extend({  tagName: 'nav' });

  •  2 3 4 
     
    <script type="text/x-handlebars" id="components/blog-post">
  • {{blog-post title=title}}

  • {{#link-to 'posts' (query-params direction="asc")}}
  • this.transitionTo('post', object, {queryParams: {showDetails: true}});
  • this.transitionTo({queryParams: {direction: 'asc'}});

2 more annotations...

  • beforeModel: function() {  this.transitionTo('posts');  }

  • renderTemplate: function() {  this.render('favoritePost');  }
  • renderTemplate: function() {  this.render({ controller: 'favoritePost' });  }
  • renderTemplate: function() {  this.render({ outlet: 'sidebar' });  }

1 more annotation...

  • setupController: function(controller, model) {  controller.set('model', model);  }
  • controllerName: 'post'

  • the value returned from your model hook will be assigned to the model property of the associated controller.
  • templates know which model to render: they look at their associated controller's model property.

  • Visiting /posts is slightly different. It will first render the posts template. Then, it will render the posts/index template into the posts template's outlet.
  • If your model does not use the id property in the URL, you should define a serialize method on your route:
  • this.route('about', { path: '/about' });

13 more annotations...

  • mber.Application.create({  LOG_TRANSITIONS: true });
  • App.Router.reopen({  rootURL: '/blog/' });

    • It adds event listeners to the document and is responsible for delegating events to your views.
  • creates a router and begins routing

  • Person.reopen({  isPerson: true });
  • Person.reopenClass({

  • Bindings can connect properties on the same object, or across two different objects.
  • householdIncome: Ember.computed.alias('wife.householdIncome')
  • userName: Ember.computed.oneWay('user.fullName')

  •  

    Observers in Ember are currently synchronous.

  • }.observes('lastName')
  • Ember.run.once(this, 'processFullName');

3 more annotations...

  • Ember.Object.extend
  • this._super(thing + ", sir!");
  • App.Soldier.create

1 more annotation...

  • uses naming conventions to wire up your objects
  • model, setupController
  • Ember.js will automatically supply an instance of Ember.ArrayController, which will present the backing Array as its model.

5 more annotations...

1 - 20 of 4392 Next › Last »
20 items/page

Diigo is about better ways to research, share and collaborate on information. Learn more »

Join Diigo