Skip to content

Conversation

@RooTooZ
Copy link
Contributor

@RooTooZ RooTooZ commented Mar 9, 2017

#26

Now we can use

@JsonApiModelConfig({
    type: 'deals',
    meta: JsonApiMetaModel
})
export class Deal extends JsonApiModel 

then

export class JsonApiMetaModel {
    public links: Array<any>;

    constructor() {
        this.links = [];
    }
}

and if we use .findAll we need to use it right that:

this.dataStore.findAll(Deal).subscribe((data: JsonApiQueryData<Deal>) => {
            this.deals = data.getModels();
            let meta: JsonApiMetaModel = data.getMeta();
            this.links = meta.links;
}

We can define any metadata what we need in JsonApiMetaModel like links and provide it in annotation to model class

@rnikunen
Copy link

rnikunen commented Mar 9, 2017

looks good to me!

@@ -0,0 +1,14 @@
import {JsonApiModel} from './json-api.model';

export class JsonApiQueryData {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make this class generic too? thus the need for a typecast when using getModels() would be obsolete.
Besides of this little change the PR LGTM ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What did you meant?

Copy link
Contributor Author

@RooTooZ RooTooZ Mar 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready! 1b269e7

@RooTooZ
Copy link
Contributor Author

RooTooZ commented Mar 16, 2017

@HennerM can you approve my merge request?

@HennerM
Copy link
Collaborator

HennerM commented Mar 16, 2017

@RooTooZ I can't approve it, only @ghidoz can, he is the owner of this repository.

@rnikunen
Copy link

Looking for a merge on this... @ghidoz?

@RooTooZ
Copy link
Contributor Author

RooTooZ commented Mar 29, 2017

@HennerM and @rnikunen

use this feature like this

"dependencies": {
    "angular2-jsonapi": "git+https://git@github.com/RooTooZ/angular2-jsonapi.git",
...
}

@HennerM
Copy link
Collaborator

HennerM commented May 7, 2017

Thanks for your work.
@ghidoz are you still maintaining this? Otherwise it would be better to have someone other to do it, or maybe just create a fork.

@clementprdhomme
Copy link

I would also appreciate having an "official" fork of this library so we can merge the PRs of the contributors and fix some of the open issues.

@rubenkuipers
Copy link

rubenkuipers commented Jun 15, 2017

Any updates on this issue? When will this be implemented?
@RooTooZ can you give me a brief explanation on how to implement your solution?

@ghidoz
Copy link
Owner

ghidoz commented Jul 1, 2017

@HennerM unfortunately I was really busy in the last months and I had no time to review the PRs and maintain the package. If you are interested and you have the time, I can make you admin. What do you think?

@HennerM
Copy link
Collaborator

HennerM commented Jul 3, 2017

Thanks @ghidoz for the information.
I would really appreciate if this package gets some maintenance. If you can make me an admin in this repository and an owner of the npm package I am happy to keep this project alive. Especially since there is still a demand for it as seen in #73 and #72

cc @RooTooZ , @pascal08 @Jcambass

@pascal08
Copy link

pascal08 commented Jul 3, 2017

@HennerM that would be great!

@ghidoz
Copy link
Owner

ghidoz commented Jul 3, 2017

Awesome! @HennerM I added you as a collaborator on this project. What is your username on NPM?
Yes, as I see there are a lot of people who are interested and it would be a pity to waste everything.

@HennerM
Copy link
Collaborator

HennerM commented Jul 3, 2017

Great, thank you very much. My npm username is "hennerm" as well. I will try to go through the issues and PR in the next weeks. If there are other people with more spare-time on their hands I am keen for joining forces, since I am kind of busy in the next days.

@ghidoz
Copy link
Owner

ghidoz commented Jul 3, 2017

Cool! You are a collaborator also on NPM now. Thanks and let me know if you need to add more collaborators.

@HennerM
Copy link
Collaborator

HennerM commented Jul 4, 2017

Thanks @ghidoz
but unfortunately it looks like I haven't write access to this repository.

@ghidoz
Copy link
Owner

ghidoz commented Jul 4, 2017

It says your invitation is pending. I think you should accept it @HennerM

@HennerM
Copy link
Collaborator

HennerM commented Jul 4, 2017

Yeah I see now, thank you!

@HennerM HennerM merged commit 1b269e7 into ghidoz:master Jul 5, 2017
@HennerM HennerM mentioned this pull request Jul 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants