0

I really like meteor-angular, however, in the following code snippet, I think there is still friction when persisting changes back to the db. For example, in this code sample:

saveParty(name: string, description: string) {
        Parties.update(this.selectedParty._id, {$set: {name: name, description: description}});
    }

it is going to difficult to manually type "name: name, description: description" if there were a large number of fields.

Is it possible to do something like (kind of like what breezsjs does):

saveParty() {
        Parties.save(this.selectedParty);
    }

or better yet:

 saveParty() {
            this.selectedParty.Save();
        }

1 Answer 1

1

Yes :) Take a look at AngularMeteorCollection methods here - http://angular-meteor.com/api/AngularMeteorCollection#methods

AngularMeteorObject methods here - http://angular-meteor.com/api/AngularMeteorObject and

And the examples at the bottom

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.