This repository was archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
MdAutocompleteCtrl.select - add val argument #4144
Comments
This is easily accomplished by modifying the existing pen for the contact chips demo such that ng-click executes a method in the controller that simply adds the selected contact from the collection of all contacts to the contacts collection of the md-contact-chips. In the markup ...
In the controller ...
|
topherfangio
added a commit
that referenced
this issue
Sep 1, 2015
After modifying the `<md-toolbar>` directive to allow both `md-scroll-shrink` and `ng-if`, we accidentally broke support for also using `ng-controller` as well as some layout problems due to the transclusion and a wrapping `<div>`. This reverts those changes but still allows for `ng-if` to work. Fixes #4144.
topherfangio
added a commit
that referenced
this issue
Sep 2, 2015
After modifying the `<md-toolbar>` directive to allow both `md-scroll-shrink` and `ng-if`, we accidentally broke support for also using `ng-controller` as well as some layout problems due to the transclusion and a wrapping `<div>`. This reverts those changes but still allows for `ng-if` to work. Fixes #4144. Closes #4423.
Please note: my above commit didn't actually do anything with this issue, I simply transposed the digits in the issue number :/ |
kennethcachia
pushed a commit
to kennethcachia/material
that referenced
this issue
Sep 23, 2015
After modifying the `<md-toolbar>` directive to allow both `md-scroll-shrink` and `ng-if`, we accidentally broke support for also using `ng-controller` as well as some layout problems due to the transclusion and a wrapping `<div>`. This reverts those changes but still allows for `ng-if` to work. Fixes angular#4144. Closes angular#4423.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
On the Contact Chips demo, a welcome user experience would be to click a contact and have it automatically added to the list of selected contacts. From what I gather, this may require an additional argument in the select method of the MdAutocompleteCtrl (auto-complete controller, autocompleteController.js).
The new argument I am proposing would simply be "val", representing a single value in the items list, which currently originates from
var items = $scope.$parent.$eval(itemExpr)
(line 517, autocompleteController.js). The idea being; an ng-click handler could be added to a contact chip md-list-item in the demo such that the auto-complete control would auto-update its collection of items.The text was updated successfully, but these errors were encountered: