Encountering an issue with AngularJS 1.50 where interpolation stops working after a specific line of code.
<input type="text" class="form-control" id="search" name="search"
placeholder="{{ shouldInterpolateButDoesnt }}"
typeahead-on-select="aGreatFunction($item)"
ng-model="selectedDog"
uib-typeahead="dog.label for dog in dogList | filter:$viewValue" typeahead-min-length="1"/>
When the page is rendered, the placeholder displays with the {{}}
still visible. Subsequently, all other interpolations also cease to work.
Simply removing the problematic line restores functionality for future interpolations.
The root cause seems to be related to uib-typeahead
, as removal of this attribute allows all interpolations to function properly again.
Attempts have been made to modify the model value based on solutions mentioned in this post: Model does not persist using uib-typeahead with ng-repeat. Yet, the issue persists.
An error is thrown in the console:
angular.js:13236 TypeError: Cannot read property 'exp' of undefined
at watchFnToHumanReadableString (<anonymous>:703:19)
at Scope.$delegate.__proto__.$watch (<anonymous>:735:28)
at new <anonymous> (http://localhost:9000/assets/lib/angular-ui-bootstrap/ui-bootstrap-tpls.js:6318:19)
at Object.invoke (http://localhost:9000/assets/lib/angularjs/angular.js:4604:19)
at extend.instance (http://localhost:9000/assets/lib/angularjs/angular.js:9855:34)
at nodeLinkFn (http://localhost:9000/assets/lib/angularjs/angular.js:8927:34)
at compositeLinkFn (http://localhost:9000/assets/lib/angularjs/angular.js:8226:13)
at compositeLinkFn (http://localhost:9000/assets/lib/angularjs/angular.js:8229:13)
at nodeLinkFn (http://localhost:9000/assets/lib/angularjs/angular.js:8973:24)
at compositeLinkFn (http://localhost:9000/assets/lib/angularjs/angular.js:8226:13) <div class="col-sm-12 col-md-12 main ng-scope" ui-view="content">