javascript - .net WebApi OData + breeze => [Q] Unhandled rejection reasons (should be empty) -


i have .net 4.5 web api odata entitysetcontroller

in client side got following js files loaded

jquery.min.js q.min.js datajs-1.1.1.min.js breeze.debug.js toastr.min.js angular.js 

when call following javascript

breeze.config.initializeadapterinstance("dataservice", "odata"); var manager = new breeze.entitymanager(servicename);  var query = breeze.entityquery.from("customers");  return manager.executequery(query).then(success).fail(fail);  function success(data) {   $log.info("retrieved " + data.results.length);   return data.results; }  function fail(data) {   $log.info("error " + data); } 

i see following in chrome network tab showing metadata , json data coming nicely...

request url:http://localhost:49971/odata/$metadata status code:200 ok, 1.8kb  request url:http://localhost:49971/odata/customers status code:200 ok, 3.3kb 

but success callback never fires, fail callback gets executed. can 1 please? see is

xhr finished loading: "http://localhost:49971/odata/$metadata". datajs-1.1.1.min.js:14 xhr finished loading: "http://localhost:49971/odata/customers". datajs-1.1.1.min.js:14 [q] unhandled rejection reasons (should empty):  [error] length: 0 __proto__: array[0]  q.js:1010 error error: ok  

i need databind these ng-grid, ng-form , send them database serverside...

some more code , screen shot

breeze.entityquery   .from("addresstypes")   .using(new breeze.entitymanager(servicename))   .execute()   .then(function(data) {     console.log(data); // never gets here wierd   }).fail(function(e) {     console.log(e); // shows error object addresstype array   }); 

i see addrestypes array in fail callback...

update: have temporarily switched breezecontoller instead of entitysetcontroller in backend, , commented out breeze.config.initializeadapterinstance("dataservice", "odata"); , array in successcb. think can infer running trouble datajs. stick entitysetcontroller though...

i had same problem. turned out, going datajs 1.0.3 seemed work. however, doing resulted $expand not work (the server works, breeze doesn't handle navigation properties -> regardless multiplicity).

i must say, terrible looking stable breezejs equivalent.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -