Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4829

Why i get 404 error when i try to get records from store?

$
0
0

@artZzz wrote:

Hi! Say me please. Why i get 404 error. Records are saving in store. Page i opening. If i try to get all users form store, my page isn`t opening with 404 error on /users. Why?

This my controller:

export default Ember.Controller.extend({
actions: {
parseJSON: function(){
var data, inner, parsed, store;

		store = this.store

		data = $('#dataJSON').val()

		parsed = JSON.parse(data)
			
		parsed.forEach(function(item){
			store.createRecord('user', item)
		})
		
	}
}

});

And this my Route:

import Ember from 'ember';

export default Ember.Route.extend({
model() {
return this.store.findAll('user');
}
});

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles