Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

feat(typeahead): change to appendTo #4797

Closed

Conversation

wesleycho
Copy link
Contributor

  • Change signature to appendTo, which takes a value that evaluates to a DOM node for API consistency

BREAKING CHANGE: This requires changing from using the string representation of the element id to select to passing in the element itself. A simple change on the user side would be to change it to a value on the element's parent $scope to a value that evaluates to the node, i.e. angular.element($document[0].getElementById('elementId'))

@Foxandxss
Copy link
Contributor

I am not sure if I understand that BC message, a bit complex. I would perhaps add what angular does. A before code and a after code. Other than that, fine for me.

- Change signature to `appendTo`, which takes a value that evaluates to a DOM node for API consistency

BREAKING CHANGE: Usage before
```html
<div id="typeahead-container"></div>
<input typeahead="state for state in states | filter: $viewValue | limitTo: 8" typeahead-append-to-element-id="typeahead-container">
```
After
```html
<div id="typeahead-container"></div>
<input typeahead="state for state in states | filter: $viewValue | limitTo: 8" typeahead-append-to="typeaheadContainer">
```
```js
$scope.typeaheadContainer = angular.element(document.querySelector('#typeaheadContainer'));
```
@wesleycho wesleycho closed this in 8637afc Nov 2, 2015
@wesleycho wesleycho deleted the feat/typeahead-append-to branch November 2, 2015 02:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants