Skip to content

Commit 990d1b4

Browse files
committed
correctly handle isolation scope of 'placeholder' attribute, fixed #15
1 parent 8e891ef commit 990d1b4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* change main proeprty of package.json to final build in dist folder, fixes #4
44
* use ng-if for search parameter input to avoid rendering issues and performance
55
* Hide in use search parameter suggestions, fixed issue #8
6+
* correctly handle isolation scope of 'placeholder' attribute, fixed #15
67

78
### 1.1.1 - 03 February 2015
89
* update README with latest changes to dist files in bower package

src/angular-advanced-searchbox.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ angular.module('angular-advanced-searchbox', [])
1616
restrict: 'E',
1717
scope: {
1818
model: '=ngModel',
19-
parameters: '='
19+
parameters: '=',
20+
placeholder: '@'
2021
},
2122
replace: true,
2223
templateUrl: 'angular-advanced-searchbox.html',
2324
controller: [
2425
'$scope', '$attrs', '$element', '$timeout', '$filter',
2526
function ($scope, $attrs, $element, $timeout, $filter) {
2627

27-
$scope.placeholder = $attrs.placeholder || 'Search ...';
28+
$scope.placeholder = $scope.placeholder || 'Search ...';
2829
$scope.searchParams = [];
2930
$scope.searchQuery = '';
3031
$scope.setSearchFocus = false;

0 commit comments

Comments
 (0)