Advertisement
Guest User

Untitled

a guest
Mar 26th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // outputs this:
  2. // undefined
  3. // undefined
  4.  
  5. Ember.Application.initializer({
  6.     name: "initializerName",
  7.  
  8.     initialize: function(container, application) {
  9.         console.log(container.store)
  10.         console.log(application.store)
  11.  
  12.         var that = this
  13.         App.$.get('/users/me').then(function(data) {
  14.             var me = application.store.createRecord(data.user)
  15.             application.set('user', me)
  16.         })
  17.     },
  18.  
  19.     after: 'store'
  20. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement