Skip to content

eagerInject doesn't add the model to the list after HTTP success #186

Closed
@elado

Description

@elado
Article.bindAll(scope, 'articles', {});
Article.findAll({});
Article.create({title: "a"}, {eagerInject: true}).then(function () {
  console.log("AFTER", Article.filter());
});
$timeout(function () { // timeout because the first inject is in a promise
  console.log("BEFORE", Article.filter());
});

// log:
// BEFORE [Article]
// AFTER []

I faked sleep on the server on insert. Seems like the initial object is injected to the list but when HTTP is done it's not there anymore.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions