Repository navigation
Conversation
|
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
|
Can someone please provide an example of how to call the LoopBack model from inside a Kendo UI datasource attribute? |
|
We have some samples online although using a somehow limited version of the custom Kendo UI data source - http://repository.akera.io:8383/slc/ (Kendo Grid using Akera Angular SDK). Since then we have extended the datasource and though we can make it generic for all LoopBack models if we can get the model definition exported on the client-side as well... what we do now for akera.io is to have a base model that exposes the 'describe' method and have all models extent that instead. We're going to release the data source on github, guess we just have to check if the model definition can be retrieved somehow and only include the schema if that is available. Thing is for anything else beside read operations the Kendo datasource need to know the model primary key - for update, delete :( |
There was a problem hiding this comment.
Please use 2 spaces for indentation for consistency, we don't use tabs anywhere else.
There was a problem hiding this comment.
Also add ; at the end of the generated statement.
R.schema = <%- ... -%>;
|
Hi @akera-io, thank you for the pull request. Please add a unit-test to verify the implementation and address my minor comments above. |
|
@slnode ok to test |
|
Hi Miroslav, addressing the comments should be straight forward, for unit-test should we add a new test in services.spec.js or what is your favourite? Cheers, Acorn IT On 25 Jan 2016, at 15:27, Miroslav Bajtoš <notifications@github.commailto:notifications@github.com> wrote: Hi @akera-iohttps://github.com/akera-io, thank you for the pull request. Please add a unit-test to verify the implementation and address my minor comments above. — |
|
added unit test, hope this is how we should have added one :) |
Hi,
we're working on a Kendo data source that can use Strongloop REST services as 'transport' and while things are working just fine for read operations for updates the Kendo data source require some schema information - the model primary key is mandatory else no update operation can take place.
While one can add that information manually when defining the data source it's a pita not to use the information already available in our models. We've just added an option to include the model definition (properties) when generating the angular resources, this is not included by default so if you think we can merge that back in 'master' we would rather not keep the fork alive. There is a minor change in the client to accommodate this.
Best regards,
Marian Edu
marian.edu@acorn.ro
www.acorn-it.com
www.akera.io