Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

Building Web Applications using Ember.JS

Building Web Applications using Ember.JS

Avatar for Neeraj Singh

Neeraj Singh

February 07, 2013
Tweet

More Decks by Neeraj Singh

Other Decks in Technology

Transcript

  1. Speaker = Ember.Mixin.create ( { hello: function() { var first

    = this.get('firstName'), last = this.get('lastName'); alert(first + ' ' + last + ': Hello'); } Person = Ember.Object.extend(Speaker); Person.create( { firstName: 'Neeraj', lastName: 'Singh' }).hello(); #=> Neeraj Singh Mixins Thursday, February 7, 13
  2. App.Post = DS.Model.extend({ collectionURL: '/posts', singleURL: '/post', title: DS.attr('string'), body:

    DS.attr('string') }); App.Post = DS.Model.extend({ title: DS.attr('string'), body: DS.attr('string') }); Thursday, February 7, 13
  3. <ul> {{#each App.items}} <li>{{name}}</li> {{/each}} </ul> App.items = [ {

    name: “One” }, { name: “Two” }, { name: “Three” } ] One Two Three Thursday, February 7, 13