Git Product home page Git Product logo

Comments (5)

v4l3nt1n avatar v4l3nt1n commented on July 22, 2024

We are having the same issue around here, our object from the api contains an 'url' property.

The issue is that if we use the 'url' inside the props definition of the model, then the url() function is never defined, so when you do fetch(), save(), etc, throws 'Error: A "url" property or function must be specified'.
And if you call the function myModel.url() from the console you get the undefined is not a function error.
Unfortunately its not a option for us to change the model's properties names, we already have our REST API working.

Thanks!

from ampersand-model.

brianberlin avatar brianberlin commented on July 22, 2024

This might help getting data into your ampersand models.
http://ampersandjs.com/docs#ampersand-state-parse

from ampersand-model.

v4l3nt1n avatar v4l3nt1n commented on July 22, 2024

Thanks brian, that should work as a workaround!

from ampersand-model.

webmasterkai avatar webmasterkai commented on July 22, 2024

Related/duplicate issue AmpersandJS/ampersand-collection-rest-mixin#3

from ampersand-model.

HenrikJoreteg avatar HenrikJoreteg commented on July 22, 2024

Hi folks! Sorry this has been sitting so long. Closing as a dupe of AmpersandJS/ampersand-collection-rest-mixin#3

Workaround is to either re-name it in using parse and serialize.

from ampersand-model.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.