I’m using ember-model with ember-app-kit for my bookmarkApp example
i have a BookmarksNewRoute
route for adding new bookmarks :
// routes/bookmarks/new.js
import Bookmark from 'appkit/models/bookmark';
var BookmarksNewRoute = Ember.Route.extend({
model: function() {
return Bookmark.create({});
}
});
export default BookmarksNewRoute;
and following BookmarksNewController
:
// controllers/bookmarks/new.js
var BookmarksNewController = Ember.ObjectController.extend({
actions:{
save: function(){
this.get("model").save();
this.transitionToRoute("bookmarks.index");
}
}
});
export default BookmarksNewController;
when i trigger the save action with a form of bookmark data it successfully send post request and save this bookmark in backend BUT after transitioning to “bookmarks.index” it show a empty row without data just when i refresh the page it show this bookmark’s data!! I’ve inspected this with emberInspector it shows that bookmark object’s field is null !!!