简体   繁体   English

angular-js UI-SELECT没有出现

[英]angular-js UI-SELECT is not appearing

I've included ui-select js and css in my page : 我在页面中包含ui-select js和CSS:

<link href="assets/plugins/ui-select/select.min.css" rel="stylesheet"
type="text/css"
<script src="assets/plugins/ui-select/select.min.js" tyle="text/javascript"
</script>

I added the ui-select as : 我将ui-select添加为:

 <div class="form-group">
    <label>Type <span style="color:red;">*</span></label>
    <ui-select ng-model="form.type" theme='bootstrap' close-on-select='false'
               ng-required="true">
        <ui-select-match placeholder='select type'>
            {{$select.selected.value}}
        </ui-select-match>
        <ui-select-choices repeat='t.id as t in types | filter:$select.search'>
            <div ng-bind-html-unsafe="t.value"></div>
            <small>
                {{t.value}}
            </small>
        </ui-select-choices>
        <ui-select>
</div>

in js : 在js中:

angular.module('backOfficeApp)
 .controller('ManagementReportsCtrl, ManagementReportsCtrl);
ManagementReportsCtrl.$inject=['$sce','$scope','$http','$filter'];
function ManagementReportsCtrl($sce,$scope,$http,$filter){

AND GET FUNCTION for $scope.types = data; $ scope.types = data的AND GET功能; ? The UI-SELECT is not appearing in my template, any solution ? UI-SELECT没有出现在我的模板中,有解决方案吗?

You need to add dependency to your module 您需要向模块添加依赖项

angular.module('backOfficeApp', ['ui.select'])
 .controller('ManagementReportsCtrl, ManagementReportsCtrl);
 ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM