Angular TypeError: name.replace is not a function for bs-popover

Angular TypeError: name.replace is not a function for bs-popover

我是 angular 的新手,在控制台中不断收到以下错误 TypeError: name.replace 不是一个函数。我不确定到底是什么原因造成的,但它似乎是由 bs-popover 引起的,可能与 snake_case?

有关

我不明白的部分是为什么如果使用 bs-popover 会抛出在文本框中使用 popover 的错误,但应用程序的其余部分运行正常并且不会抛出错误。

有谁知道此错误消息的原因和可能的修复方法?

Html:

<input class="form-control" ng-model="chequeValue.BankName" name="BankName" 
ng-required='true'  data-toggle="tooltip" data-placement="top" title=" {{chequeValue.BankName}}" data-unique="1" data-auto-close="1" data-placement="top" data-content-template="popover-tmpl.html" data-title="Name" data-html="true" bs-popover>

angular 表达式中不能有空格

title=" {{chequeValue.BankName}}"

我不确定这是否是问题所在。进一步查看文档并更新到 uib-popover

https://angular-ui.github.io/bootstrap/#popover

我找到了问题的答案。与其使用 angular-strap 弹出框,不如使用 ui-bootstrap 中的 bootstrap 弹出框。

<input class="form-control" ng-model="chequeValue.BankName" popover='{{chequeValue.BankName}}' data-placement="top" title=" {{chequeValue.BankName}}" popover-trigger="focus" popover-auto-close="outsideClick" popover-placement="top" popover-title="Drawee Bank Name">