gpt4 book ai didi

javascript - Angular ui-select css 不适用于 ui-bootstrap

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:02:47 24 4
gpt4 key购买 nike

我正在尝试使用 Angular ui-select在我的元素中,但不知何故 css 无法正常工作。

index.html:

  <link rel="stylesheet" href="bower_components/bootstrap-social/bootstrap-social.css" />
<link rel="stylesheet" href="bower_components/angularjs-slider/dist/rzslider.css" />
<link rel="stylesheet" href="bower_components/angular-dropdowns/dist/angular-dropdowns.css" />
<link rel="stylesheet" href="bower_components/angular-loading-bar/build/loading-bar.css" />
<link rel="stylesheet" href="bower_components/textAngular/dist/textAngular.css" />
<link rel="stylesheet" href="bower_components/perfect-scrollbar/src/perfect-scrollbar.css" />
<link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.css" />
<link rel="stylesheet" href="bower_components/angularjs-toaster/toaster.css" />
<link rel="stylesheet" href="bower_components/ngprogress/ngProgress.css" />
<link rel="stylesheet" href="bower_components/angular-ui-select/dist/select.css" />
<script src="bower_components/ng-file-upload-shim/ng-file-upload-shim.js"></script>
<script src="bower_components/perfect-scrollbar/src/perfect-scrollbar.js"></script>
<script src="bower_components/angular-perfect-scrollbar/src/angular-perfect-scrollbar.js"></script>
<script src="bower_components/moment/moment.js"></script>
<script src="bower_components/fullcalendar/dist/fullcalendar.js"></script>
<script src="bower_components/angular-ui-calendar/src/calendar.js"></script>
<script src="bower_components/angularjs-geolocation/src/geolocation.js"></script>
<script src="bower_components/angularjs-toaster/toaster.js"></script>
<script src="bower_components/ngprogress/build/ngProgress.js"></script>
<script src="bower_components/angular-ui-select/dist/select.js"></script>

包版本:

Angularjs: 1.4.5 
ui-bootstrap: 0.11.2
Angular ui-select: 0.12.1

html文件:

<ui-select ng-model="stream.selected" theme="select2" ng-disabled="disabled" style="min-width: 300px;">
<ui-select-match placeholder="Select a social profile in the list">{{$select.selected.name}}</ui-select-match>
<ui-select-choices repeat="profile in socialNetworks | filter: $select.search">
<div ng-bind-html="profile.name | highlight: $select.search"> </div>
</ui-select-choices>
</ui-select>

Controller .js

'use strict';

angular.module('myApp')
.controller('AddStreamPopUpCtrl', function ($scope, $modalInstance, $state, socialNetworks, $modal) {

$scope.close = function () {
$modalInstance.dismiss('close');
};

$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};

$scope.redirect = function() {
$state.go('dashboard.mailbox.inbox');
$modalInstance.dismiss('close');
};

$scope.socialNetworks = [{name:'test', value: 'someVal'}];
});

以上代码的结果类似于:

enter image description here

任何人都可以指点为什么这不能正确加载 css 吗?

最佳答案

Plunker example修改为不下载'select2.css'。

尝试

<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/select2/3.4.5/select2.css">

关于javascript - Angular ui-select css 不适用于 ui-bootstrap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32396660/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com