ember.js - How does Ember Data make the decision about what URL to look at when requesting data? -


i have following route file index.js:

export default ember.route.extend({   model() {     return this.store.findall('rental');   } }); 

in tutorial on ember site, states ember data fetch data /rentals url - why not @ /rental (as had defined in route file)?

ember data follows restful endpoint design states resources endpoints plural. when ask store findall rental asking find of records model type rental not hit endpoint rental.

https://codeplanet.io/principles-good-restful-api-design/

if endpoints non-standard, or pain use ember data, can create custom adapters , serializers. or can use normal ajax calls.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -