Search Posts

Category: search

how to view the data when searching without submitting | angularjs

in order to make the search process faster, my client requested to view the data when just the search box is filled without even submitting, my code works fine at submitting, what should i change with my code so i can get the desired result. this is my first project with angular js, i am very new to this technology. Many thanks in advance. HTML View: <input id=”searchInput” type=”text”/> // search box where // the […]

md-select-header search doesn’t filter selection

I’m trying to put a search in my md-select-header, but when I type stuff in, the selection list does not filter at all. Am I missing something obvious? I followed the documentation on the angular Material site pretty carefully, but still no luck. <md-select name=”{{field.name}}” ng-model=”fieldValue” ng-model-options=”{getterSetter: true}” ng-disabled=”field.isReadonly()” md-on-close=”clearSearchTerm()” data-md-container-class=”selectdemoSelectHeader”> <md-select-header class=”demo-select-header”> <input ng-model=”searchTerm” ng-keydown=”$event.stopPropagation()” type=”search” placeholder=”Search for..” class=”demo-header-searchbox md-text”> </md-select-header> <md-option ng-value=”c.label” ng-repeat=”c in field.choices track by c.value | filter:searchTerm”>{{c.label}}</md-option> </md-select> Source: AngularJS

Angularjs: Search filter now working when name starting with ! (exclamation mark)

I have list of states and I have added search filter on name of states. I have array like this: stateList : [{name: ‘abc’, area:500},{name: ‘!def’, area:500}] I have <li> with ng-repeat=”state in stateList | filter:{name:searchText}” Search text box with ng-model=”searchText” Search is working in normal scenario but when I search !(exclamation mark). It is not giving any result. It should give state with name ‘!def’ Source: AngularJS

AngularJS md-autocomplete return all possible substrings

I’m using md-autocomplete to let users search through subjects at my university. The problem is my search function only searches sequentially (left to right) through each display value. For example: If I search “Arts and Architecture” I get “no results found”, which I do not want to happen. I would like “Arts and Architecture” to return a result. The subjects are in this format: $scope.subjects = [ { value: ‘AA’, display: ‘AA – Arts and […]

Search filter with regex stuck my search filter and It does work without refresh?

I am searching for patient through my search filter.It worked in simple case but when I search with sabir it stuck and after removing the searchText sabir It does not work.It doesn’t generate the request next time.How do I handle sabir in angular2. Thanks in advance Here is code snippet Url which does work and does not work? work “http://172.16.1.101:8080/openmrs/ws/rest/v1/patient?q=sabir&v=full” Does not work “http://172.16.1.101:8080/openmrs/ws/rest/v1/patient?q=&v=full” I am using this function for handling the Url. ValidURL(str):boolean { […]