brabertaser19 brabertaser19 -5 years ago 382
AngularJS Question

Restangular: long url with params

I'm trying to do such query url:'company').one('manager').one(managerId).get(params)

which should be for example:


but something went wrong, and i get:

Error: You're creating a Restangular entity with the number instead of the route or the parent. For example, you can't call .one(12).

What i do wrong?

What is the best way of solving this issue?

sure, i can do this:'company').one('manager/' + managerId).get(params)

but it's to ugly way...

Answer Source'company').one('manager', managerId).get(params)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download