angular-odata-es5 icon indicating copy to clipboard operation
angular-odata-es5 copied to clipboard

Provide better Documentation

Open nickwinger opened this issue 6 years ago • 7 comments

Hi,

thank you for your library we are using it. However could you please wirte more JsDoc usage comments and also more Examples. For example we don't know how to use the PagedResult exactly. What is the "Apply" Method for ?? How can we query just the $count ?

Thanks, Nick

nickwinger avatar Feb 10 '19 10:02 nickwinger

You can see an example here: https://github.com/StefH/angular-odata-es5/blob/master/demo/employeeGridOData.component.ts#L68

StefH avatar Feb 10 '19 10:02 StefH

wow, that was a fast answer ;) thanks The example is very informativ, yes But what is this Apply Method, just to complete it

Thanks

nickwinger avatar Feb 10 '19 10:02 nickwinger

Apply is for applying selection and filter.

Exec is for exetuting the query using http calls

StefH avatar Feb 10 '19 10:02 StefH

Another thing: It seems that the Delete command cannot handle guids ? this.odataService.Delete(guid'${id}').Exec();

In Postman for example i use: odata/Employees(guid'1ab0c115-f8dd-415e-bbeb-7f6f905962ad')

This is the way Web Api 2 accepts guids in odata, without it i get an error.

nickwinger avatar Feb 10 '19 15:02 nickwinger

I did not test this specific scenario, however you could just call .Delete('3dde7303-5414-4af6-b96b-591f33d25445') ?

StefH avatar Feb 12 '19 16:02 StefH

@nickwinger Any update on this issue?

StefH avatar Apr 01 '19 08:04 StefH

Right now i have to create my own post , because the library does not support the guid notation of odata

nickwinger avatar Apr 01 '19 10:04 nickwinger