Hello,
I'm relatively new to JMVC and I'm having a problem understanding why my success callback is never called when returning success from a fixture. I've read through the docs and looked around for examples but I don't see anything wrong with the code. Any ideas?
code:
myFixture : function(args) {
$.ajax({
url : '/myuri',
type : 'get',
contentType : 'application/json',
success : function(data){
steal.dev.log('fixture data:');
steal.dev.log(data);
}
});
}
myFixture();
steal("jquery/dom/fixture", function(){
$.fixture.on = true;
$.fixture("/myuri", function(original, settings, headers){
return [200, "success",{
"notifications": [
{
"id": 1,
"type": "TEST1",
"data": {
"test1": "testing1"
}
},
{
"id": 2,
"type": "TEST2",
"data": {
"test2": "testing2"
}
}
]
}, {} ]
})
});
console:
steal.js INFO: using a dynamic fixture for get /myuri
Thanks,
Jason