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

Typeahead + Bootstrap 2.3.2 + Angular 1.2.0 RC2 #1154

Closed
Siyfion opened this issue Oct 10, 2013 · 7 comments
Closed

Typeahead + Bootstrap 2.3.2 + Angular 1.2.0 RC2 #1154

Siyfion opened this issue Oct 10, 2013 · 7 comments

Comments

@Siyfion
Copy link

Siyfion commented Oct 10, 2013

I'm struggling to get the typeahead working with this mix of libraries, is this something that's supposed to be supported?

See here: http://plnkr.co/edit/VaVXTn?p=preview

@kruser
Copy link

kruser commented Oct 10, 2013

I had to go back to Angular 1.1.5 to get the Typeahead working.

@pkozlowski-opensource
Copy link
Member

Apart from #949 (that needs to be fixed on the AngularJS side) you simply had number of coding mistakes in your plunk. Fixed version here: http://plnkr.co/edit/oaqWQh?p=preview

@pkozlowski-opensource
Copy link
Member

@kruser I'm not aware of any other issue than one reported in #949 Did you bump into something else? We need to be precise otherwise it is easy to start spreading FUD...

@kruser
Copy link

kruser commented Oct 10, 2013

@pkozlowski-opensource, there is no other issue. I was using promises in my return values. #949 encapsulates the issue entirely.

@Siyfion
Copy link
Author

Siyfion commented Oct 10, 2013

Ah, sorry... My problem is the one described by #949, however I created such a shoddy plunkr I thought that the issue was more widespread than it really is... My bad 😢

@Siyfion
Copy link
Author

Siyfion commented Oct 10, 2013

In reality my HTML is:

<input type="text" class="input-block-level" ng-model="part.labelImage"
typeahead="file as file.filename for file in labelImages($viewValue)"
typeahead-editable="false" typeahead-on-select="measureLabels($index)"
required/>

and CoffeeScript:

$scope.labelImages = (imgFilename) ->
      return $http.get('https://api.mywebsite.com/labelImages?limit=15&' +
        'sPath=filename&sVal=' + encodeURIComponent(imgFilename))
        .then (response) ->
          return response.data

@Siyfion
Copy link
Author

Siyfion commented Oct 10, 2013

And I've confirmed the issue doesn't arise in 1.2.0-rc1, so it's definitely that. Thanks all.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants