Sergei Basharov
Sergei Basharov

Reputation: 53948

Spine.js error when trying to use its Ajax features

I am trying out Spine.js and want to configure it to interact with my app on server side. Here is the code:

var Album = Spine.Model.sub();
Album.configure("Album", "public");
Album.extend(Spine.Model.Ajax);

The last line causes this error:

uncaught exception: extend(obj) requires obj

What is the problem here? It's a code from the tutorial, except they use Task and I use Album.

Upvotes: 3

Views: 595

Answers (2)

user1261290
user1261290

Reputation:

For clarity. What I had to do to resolve this issue was add 'spine/lib/ajax' to slug.json under the modules list and require('spine/lib/ajax') in setup.coffee.

Upvotes: 2

topek
topek

Reputation: 18979

Have you included the ajax.js file from spine? It seems to me that Spine.Model.Ajax is not an object.

Upvotes: 3

Related Questions