复制工作 ui-sref 代码,更改参数和错误不断出现。这里出了什么问题?

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

我从我的应用程序复制了工作代码并更改了参数,但错误不断出现。怎么了? This is the error message from AngularJS.

我已经查看了 Whosebug 和 Google。 AngularJS 文档也没有帮助。

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'
    });

我想将 ui-sref 与多个参数一起使用,这应该是可行的。

您遇到错误是因为 {{$ctrl.merchant.id}} 和 {{ x.id }} 没有向其中返回任何值并且对象语法失败。检查此处未连接的控制器。