Marc
Marc

Reputation: 81

Copied working ui-sref code, changed params and errors keep coming. What's wrong here?

I copied working code from my application and changed the params and errors keep coming. What's wrong? This is the error message from AngularJS.

I've looked on StackOverflow and Google already. The AngularJS documentation is also not helping.

Link:

<a ui-sref="auth.invoice({merchant: {{ $ctrl.merchant.id }}, invoice: {{ x.id }}})" class="btn btn-success"><i class="fa fa-angle-double-right" aria-hidden="true"></i></a>

StateProvider:

$stateProvider.state('auth.invoice', {
        url: '/invoice/:merchant/:invoice',
        component: 'invoiceComponent'
    });

I want to use ui-sref with multiple params, this should be possible.

Upvotes: 0

Views: 13

Answers (1)

Rahul Beniwal
Rahul Beniwal

Reputation: 677

You are getting errors because {{$ctrl.merchant.id}} and {{ x.id }} not returning any value into it and object syntax failed. Check your controller which is not attached here.

Upvotes: 1

Related Questions