brabertaser19 brabertaser19 - 8 months ago 105
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'company').one('manager', managerId).get(params)