NgStrap的除了显示不正确 [英] NgStrap's Aside not showing correctly

查看:156
本文介绍了NgStrap的除了显示不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个有点类似<一个href=\"http://stackoverflow.com/questions/29691034/modal-not-showing-correctly-when-i-put-it-into-a-directive\">my previous问题,但现在我有工作除了

This is a bit similar to my previous problem but now i'm working with Aside

我的问题如下:

My problem is the following :

这是显示不正确。这里工作 plnk ,但是当我试着做我的项目完全一样,它没有得到同样的结果。

It's not showing correctly.. Here a working plnk, but when I try to do exactly the same in my project, it don't get the same result.

下面我code结构:

的index.html ,所有的UI路由器的意见在这里注入了:

index.html where all ui-router views are injected here:

<body ng-app="module.app">

        <nav class="navbar navbar-inverse">
                  <div topbar></div>
        </nav>

        <div class="container-fluid">

                    <div class="col-md-2">
                            <div sideBar></div>
                    </div>

                    <div class="col-md-10">

                        <div ui-view="messageBoard"> </div>
                        <div ui-view="ticketView"> </div>

                        <div ui-view> </div>

                    </div>

        </div>

</body>

现在一个空的控制器,但它应该工作:

An empty controller for now, but it should work:

var chatModule = angular.module('module.chat', ['ui.router','angularMoment','mgcrea.ngStrap.aside']);

chatModule.controller('ChatController', function($scope, $aside,$rootScope) {
});

路线正如你所看到的此状态将在主HTML文件的unamed观点被注入

chatModule.config(function($stateProvider, $urlRouterProvider,$locationProvider) {

    // use the HTML5 History API
    $locationProvider.html5Mode(true);

    $stateProvider
                .state('Chat', {
                                      url: '/Chat',
                                      templateUrl: 'app/shared/chat/views/chat.html',
                                      controller: 'ChatController',

                                })


});

chatbox.html

<div>
<b>this is a template</b>

</div>

chat.html (从ngStrap的文档复制粘贴)

chat.html(copy paste from ngStrap's doc)

<button  type="button" class="btn btn-lg btn-danger" data-template="app/shared/chat/views/chatbox.html" data-placement="left" data-animation="am-slide-left" bs-aside="aside" data-container="body">Custom aside
  <br>
  <small>(using data-template)</small>
</button>

任何建议,使这个解决了吗?

Any suggestion to make this solved ?

推荐答案

你包括CSS呢?

<link rel="stylesheet" href="//mgcrea.github.io/angular-strap/styles/libs.min.css">

这篇关于NgStrap的除了显示不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆