angular.js - ui-bootstrap的弹框等组件不知道怎么的用不了

查看:96
本文介绍了angular.js - ui-bootstrap的弹框等组件不知道怎么的用不了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

(function() {
    'use strict';
    angular
        .module('vipservice')
        .controller('patientsController', patientsController);

    /**
     * @ngInject
     */
    function patientsController($scope, $translate, $cookieStore, $interval, $state, $modal, $uibModal) {
        var lang = $cookieStore.get('lang');
        if (!lang) {
            $cookieStore.put('lang', 'cn');
            $scope.btnText = '英文';
        }
        $scope.btnText = lang === 'cn' ? '英文' : '中文';
        $scope.switching = function() {
            lang = lang === 'cn' ? 'en' : 'cn';
            $scope.btnText = lang === 'cn' ? '英文' : '中文';
            $cookieStore.put('lang', lang);
            $translate.use(lang);
            window.localStorage.lang = lang;
            window.location.reload();
        };
        $scope.cur_lang = $translate.use();
        $scope.open = function() {
            $uibModal.open({
                animation: true,
                ariaLabelledBy: 'modal-title',
                ariaDescribedBy: 'modal-body',
                templateUrl: 'myModalContent.html',
                controller: 'patientsController',
                size: size
            });
        };

    }
})();


不知道为什么UI-bootstrap里面的组件都用不了 tabs 之类的直接没效果

解决方案

不清楚angularbootstrap和UIbootstrap有什么区别 两者好像冲突了 重新bower install就好了。

这篇关于angular.js - ui-bootstrap的弹框等组件不知道怎么的用不了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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