Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Fixtures in CanJS & JSMVC

$
0
0
If you look at the docs for CanJS here, you'll see how to use fixtures now.

In your example, you should include the HTTP verb in your fixture definition so the POST Ajax call does not use the fixture. So your fixture becomes:

  1. can.fixture("GET fixtures/booking_list.json", "fixtures/booking_list.json");

If you want a comprehensive fixture (one you can retrieve/add/edit/delete, you can use can.fixture.make.

Viewing all articles
Browse latest Browse all 3491

Trending Articles