Skip to content

Commit

Permalink
feat(template): expose label in ng-label-tmp
Browse files Browse the repository at this point in the history
closes #274
  • Loading branch information
varnastadeus committed Feb 19, 2018
1 parent d0295fa commit f3cfc7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ng-select/ng-select.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ng-template
[ngTemplateOutlet]="labelTemplate || defaultLabelTemplate"
[ngTemplateOutletContext]="{ item: item.value, clear: clearItem }">
[ngTemplateOutletContext]="{ item: item.value, clear: clearItem, label: item.label }">
</ng-template>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/ng-select/ng-select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie
}

if (tag instanceof Promise) {
tag.then(newTag => this.select(this.itemsList.addItem(newTag)))
tag.then(item => this.select(this.itemsList.addItem(item)))
.catch(() => { });
} else if (tag) {
this.select(this.itemsList.addItem(tag));
Expand Down

0 comments on commit f3cfc7a

Please sign in to comment.