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.

items is undefined #1926

Open
Open
@AllenZhang34

Description

@AllenZhang34

Bug description:

This is my code
HTML:
<h3>Object Tags <small>(with grouping)</small></h3><ui-select multiple ng-model="ctrl.multipleDemo.selectedPeople" theme="bootstrap" ng-disabled="ctrl.disabled" sortable="true" style="width: 800px;" title="Choose a person"><ui-select-match placeholder="Select person...">{{$item.displayName}} &lt;{{$item.email}}&gt;</ui-select-match><ui-select-choices repeat="person in ctrl.people | propsFilter: {displayName: $select.search, sapID: $select.search}" ><div ng-bind-html="person.displayName | highlight: $select.search"></div><small> email: {{person.email}} sapID: <span ng-bind-html="''+person.sapID | highlight: $select.search"></span></small></ui-select-choices></ui-select><p>Selected: </p><pre>selectedPeople = {{ctrl.multipleDemo.selectedPeople}}</pre><hr>
JS:

$http.get(GlobalConfig.getServiceUrl() + 'project/' + projectId + '/users', {timeout: $scope.out_time}) .then(function successCallback(data){vm.people=data.data.data console.log(vm.people) vm.multipleDemo.selectedPeople = [vm.people[1]] console.log(vm.multipleDemo.selectedPeople)

It can get data in DB,but can not show in HTML, when i debugger .filter('propsFilter', function() { return function(items, props) { debugger; var out = [];

it say items undefinded how to deal with it

Activity

Jefiozie

Jefiozie commented on Feb 27, 2017

@Jefiozie
Contributor

PLease provider a plunker with version number. for reproducing. For now It doesn't look like a bug but something that is not correct in your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Jefiozie@AllenZhang34

        Issue actions

          items is undefined · Issue #1926 · angular-ui/ui-select