Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Keeps throwing error Expected 1 .ui-select-match but got '0' #71

@martyphee

Description

@martyphee

This is being used in a modal popup. I've seen it before, but can't remember how I fixed it. Not sure if it has something to do with the modal or using controlerAs syntax.

http://plnkr.co/edit/UyuPozU95DzvjbOcl8YJ?p=info

 function StudentPollSettingsCtrl($scope, $modalInstance, content, EDITOR_OPTIONS, StudentPollService) {
        this.chartObject = {};

        this.chartType = {};
        this.chartTypes = [
            {
                value: "pie",
                name: "Pie"
            },
            {
                value: "column",
                name: "Column"
            }
        ];
<tab heading="Chart" select="settingsCtrl.updateChart()">
            <div class="row">
                <div class="col-xs-12">
                    <div style="display: inline-block; width: 300px; margin-left: 10px">
                        <ui-select ng-model="settingsCtrl.chartType"
                                   theme="selectize" ng-change="settingsCtrl.updateChart()">
                            <match placeholder="Choose Chart Type">{{$select.selected.name}}</match>
                            <choices repeat="option in settingsCtrl.chartTypes">
                                <div ng-bind-html="option.name"></div>
                            </choices>
                        </ui-select>
                    </div>
                </div>
            </div>
Error: [ui.select:transcluded] Expected 1 .ui-select-match but got '0'.
    at http://0.0.0.0:9000/bower_components/angular-ui-select/dist/select.js:32:12
    at http://0.0.0.0:9000/bower_components/angular-ui-select/dist/select.js:360:17
    at publicLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:5890:29)
    at boundTranscludeFn (http://0.0.0.0:9000/bower_components/angular/angular.js:6005:21)
    at controllersBoundTransclude (http://0.0.0.0:9000/bower_components/angular/angular.js:6600:18)
    at link (http://0.0.0.0:9000/bower_components/angular-ui-select/dist/select.js:350:7)
    at nodeLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:6579:13)
    at delayedNodeLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:6798:11)
    at compositeLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:5982:15)
    at compositeLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:5989:13) <div class="selectize-control single ng-pristine ng-valid" ng-model="settingsCtrl.chartType.selected" theme="selectize" ng-change="settingsCtrl.updateChart()"> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions