Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 11 2020 18:30
    nick-allen removed as member
  • Jul 18 2020 00:41
    nick-allen added as member
  • Sep 13 2019 15:39
    juristr removed as member
  • Jul 06 2018 14:18
    amcdnl removed as member
  • Mar 30 2018 12:42
    bullwinkle commented #72
  • Sep 18 2017 16:52
    amcdnl added as member
  • Sep 17 2017 15:00
    amcdnl removed as member
  • Sep 17 2017 14:45
    amcdnl added as member
  • Jun 21 2017 21:46
    amcdnl commented #78
  • Jun 21 2017 20:58
    mateusleon commented #78
  • Jun 21 2017 20:58
    mateusleon commented #78
  • Jun 21 2017 20:11
    amcdnl commented #78
  • Jun 21 2017 20:11
    amcdnl closed #78
  • Jun 21 2017 19:09
    mateusleon edited #78
  • Jun 21 2017 19:08
    mateusleon opened #78
  • Feb 15 2017 15:19
    kevinverelst reopened #76
  • Feb 15 2017 15:19
    kevinverelst closed #76
  • Feb 15 2017 15:19
    kevinverelst commented #76
  • Feb 15 2017 13:19
    amcdnl commented #76
  • Feb 15 2017 09:40
    albohlabs commented #76
Ryan Hutchison
@rhutchison
Thank you @amcdnl
Mark McCook
@mmccook
the property ‘wrap’ can be put on actions right? I’m setting wrap to true and not getting a length property is that by design ?
Austin
@amcdnl
anyone got any feedback onthis? Swimlane/angular-model-factory#56
@/all ^^
Ryan Hutchison
@rhutchison
Does this transpile back to ES5?
Austin
@amcdnl
ya, babel
i thought about introducing RxJS too
plitzenberger
@plitzenberger
hi guys - is it possible to consume nested api's like /projects/1/scenarios/1/loadcases/1/loads/1
and ideally have all these as proper javascript classes ([Project {... scenarios: [Scenario {... loadcases: [Loadcase { .. etc ...}] }]}]) not all of same class (Model {})
Juri Strumpflohner
@juristr
@plitzenberger I never tried that as I think it gets too complicated. What I do is to use the URL templates and create a custom action on a model Project like getLoadForScenario with url {id}/scenarios/{scenarioId}/loadcases/{loadcaseId}/loads/{loadId} or something similar.
But I'll reflect on whether such a scenario would make sense / how it could be implemented. @plitzenberger If you're interested, make a proposal on our git repo, opening a new issue and discuss potential solution approaches you might already have thought of. So we can discuss. Thx :smile:
@plitzenberger btw, I know that @rhutchison has done quite some acrobatics with models. Maybe he might be able to give u some input as well
This message was deleted
@/all we switched to fully automated releases to bower and npm thanks to the semantic-release plugin. As such we've also updated our contribution guidelines: https://github.com/Swimlane/angular-model-factory/blob/master/CONTRIBUTING.md. This will help us make releases easier and faster, especially as we plan towards ES6 and Angular 2 support
plitzenberger
@plitzenberger
@juristr Thx for your answer. I will create a proposal.
Austin
@amcdnl
@plitzenberger i thought about this a lot … i dont have a strong use case personally
also i had concerns about it being SUPER chatty
vs just 2 query calls and merging
i try to do this merging at my server level
plitzenberger
@plitzenberger
@amcdnl sorry, but what do u mean with “just 2 query calls and merging"
do u query the different endpoints and then re assemble it frontend side?
Austin
@amcdnl
yes
or have the server assemble
gandaldf
@gandaldf
Hello people! I landed here because
I need some info about modelFactory.. I'd like to use it in my next heavy modeled project
and I would
like to know if each save() or destroy() or the same modelFactory() methods are promise-based..
Austin
@amcdnl
yes
@gandaldf
gandaldf
@gandaldf
@amcdnl thank you very much!
Is there some documentation and / or example about relationships? what kind of relationships model-factory supports?
Austin
@amcdnl
not much relationship handlement
wiki has docs
Jeff
@Jefftopia
Can someone give me an example of providing a static http request that has string parameters to be interpolated? I'm not sure how to configure my request to handle input
E.g.,
...
actions: {
    base: { ... },
    deleteLink: {
        method: 'DELETE',
        url: 'path/{id}/links/{linkId}'
    }
}
Just to be clear, modelFactory seems to be turning the following attempt into a plain get request from the base URL; i.e., modelFactory is breaking this:
...
actions: {
    base: {...},
    deleteLink: function(id, linkId) {
        method: 'DELETE',
        url: 'path/' +   id + '/links/' + linkId       
    }
}
Juri Strumpflohner
@juristr
@Jefftopia Hi, this should be totally possible unless we have a bug in it.
I just added an example in our spec file:
Here's the configuration: https://github.com/Swimlane/angular-model-factory/blob/master/test/spec/modelUsage.spec.js#L718
let me know if you're having problems getting it to work
Jeff
@Jefftopia
@juristr Perfect, thanks!
vchirkov
@vchirkov
Hi, can you update version with latest changes, please.
Juri Strumpflohner
@juristr
@vchirkov What exactly do you mean? All new changes in master are automatically released on npm and bower
Juri Strumpflohner
@juristr
@vchirkov Oh, I think I've seen what you mean. Strangely Travis didn't deploy it. Will give it a look
Juri Strumpflohner
@juristr

Seems like the GitHub token for semantic-release is broken: https://travis-ci.org/Swimlane/angular-model-factory#L374

@amcdnl Any idea whether something changed in the configuration? Worked seamlessly for the last release

Jeff
@Jefftopia

Is this the correct syntax for a PUT?

    actions: {
        update: {
            method: 'PUT',
            url: '/{id}',
            data: 'data'
        }
    }

Then call with:

myTask.update({ data: dataVariable, id: idVariable })

Jeff
@Jefftopia

@juristr I'm having an issue with my post - see above for syntax. The problem is that the data I'm passing in via { data: 'data' } is being wrapped.

In other words, I want to pass the value of 'data', but the thing being PUT is data: { myData }

Is this clear?
the thing being PUT is data : { myData }, when it should be only myData
Jeff
@Jefftopia
figured it out, just pass the data to update(data)
Juri Strumpflohner
@juristr
great.
Anyways, normally I don't call update(...) directly but rather save. The data should already be in the model instance