uib-typeahead displaying undefined

341 Views Asked by At

The following is my html:

<div class="input-group">
  <span class="input-group-addon"><%= fa_icon "search" %></span>
  <input type="text" class="form-control" placeholder="Search" ng-model="selectedFirm" uib-typeahead="n as n.message for notification in notifications|filter:$viewValue">
</div>

and the following is my coffeescript

class NavbarController
    constructor: ($scope) ->
      $scope.notifications_open = false
      $scope.notifications = [
        {message:'hey'},
        {message:'hello'},
        {message:'hola'}
      ]

whenever I type in the typeahead the results are filtered in the right way but display only undefined instead of the message.

I'm using AngularJS v1.4.9 and ui.bootstrap Version: 1.1.2

0

There are 0 best solutions below