Javascript 角度引导模式正在将整个页面加载到模式(13.0)

Javascript 角度引导模式正在将整个页面加载到模式(13.0),javascript,angularjs,twitter-bootstrap,angular-ui-bootstrap,bootstrap-modal,Javascript,Angularjs,Twitter Bootstrap,Angular Ui Bootstrap,Bootstrap Modal,我正在跟踪您的文档 我不允许更新引导(由于各种原因) 我几乎完全复制了文档,但我得到了以下效果(整个站点正在加载到模式中,忽略黑匣子): 我的代码如下: navbar.html 在模板自己的文件中注册模板 我不明白为什么模态会加载整个站点:-/这是因为如果要加载模态,还需要在同一html中包含模板。。虽然这是自动的,但有点傻 无论如何,解决此问题的代码是: <div ng-include="'app/components/some-modal/some-modal.html'">&

我正在跟踪您的文档

我不允许更新引导(由于各种原因)

我几乎完全复制了文档,但我得到了以下效果(整个站点正在加载到模式中,忽略黑匣子):

我的代码如下:

navbar.html

在模板自己的文件中注册模板


我不明白为什么模态会加载整个站点:-/

这是因为如果要加载模态,还需要在同一html中包含模板。。虽然这是自动的,但有点傻

无论如何,解决此问题的代码是:

<div ng-include="'app/components/some-modal/some-modal.html'"></div>

您的
模板URL
可能不正确。这本可以做到:

templateUrl:'app/components/some-modal/some-modal.html'

$scope.openRegisterModal = function() {
        $modal.open({
            animation: true,
            templateUrl: 'register-modal.html',
            controller: 'RegisterModalController',
            size: 'sm'
        });
    };
<div ng-controller="RegisterModalController">
<script type="text/ng-template" id="register-modal.html">
    <div class="modal-header">
        <h3 class="modal-title">I'm a modal!</h3>
    </div>
    <div class="modal-body">
        Test body
    </div>
    <div class="modal-footer">
        Test footer
    </div>
</script>
</div>
'use strict';

//Instance of register modal.
angular.module('passionForgeApp').controller('RegisterModalController', ['$scope',  function ($scope) {

    console.log('Did load RegisterModalController');

}]);
<div ng-include="'app/components/some-modal/some-modal.html'"></div>