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

Commit

Permalink
refactor(typeahead): avoid string manipulation for DOM elements
Browse files Browse the repository at this point in the history
  • Loading branch information
pkozlowski-opensource committed Jun 8, 2013
1 parent 91ac17c commit 67e9d23
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/typeahead/typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position'])
var onSelectCallback = $parse(attrs.typeaheadOnSelect);

//pop-up element used to display matches
var popUpEl = angular.element(
"<typeahead-popup " +
"matches='matches' " +
"active='activeIdx' " +
"select='select(activeIdx)' "+
"query='query' "+
"position='position'>"+
"</typeahead-popup>");
var popUpEl = angular.element('<typeahead-popup></typeahead-popup>');
popUpEl.attr({
matches: 'matches',
active: 'activeIdx',
select: 'select(activeIdx)',
query: 'query',
position: 'position'
});

//create a child scope for the typeahead directive so we are not polluting original scope
//with typeahead-specific data (matches, query etc.)
Expand Down

0 comments on commit 67e9d23

Please sign in to comment.