【问题标题】:Angular bootstrap UI typeahead errorAngular bootstrap UI typeahead 错误
【发布时间】:2016-03-25 05:35:15
【问题描述】:

我最近更新了 Angular UI 引导程序。页面加载时出现此错误-

错误:[$compile:tplrt] 指令“uibTypeaheadPopup”的模板 必须只有一个根元素。 uib/模板/typeahead/typeahead-popup.html

具有输入标签的模板文件具有正确的根元素。

<div>
<div class="form-row">
    <div class="form-cell"><label class="control-label">Cc : </label></div>
    <div class="form-cell">
        <input name="ccClientInput" type="text" ng-model="asyncSelected"
               uib-typeahead="address as address.SearchDisplay for address in clientCcSearch.getClients($viewValue)"
               typeahead-loading="loadingLocations"
               typeahead-editable="false"
               typeahead-wait-ms="300"
               placeholder="Search for colleagues"
               class="clientcc-search">
        <div>
            <span ng-repeat="client in CcClients">
                <span class="clientcc">
                    <span class="client-tooltip" tooltip tooltip-contents="createTooltip(client)">{{client.Name}}</span>
                    <span ng-click="removeClientCC($index)" class="cursor-pointer ccCl">
                        <i class="icon-remove-on-s"></i>
                    </span>
                </span>
            </span>
        </div>
    </div>
</div>

【问题讨论】:

    标签: angularjs angular-ui-bootstrap


    【解决方案1】:

    问题是,您还没有关闭&lt;div&gt; 元素之一。

    【讨论】:

    • 如果你仔细观察,我看不到任何 div 标签打开。
    • 第一个
      没有关闭。
    【解决方案2】:

    问题是在将 tpls 添加到 grunt 时出现拼写错误。 谢谢, RZ

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-10-09
      • 2023-04-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多