Search Posts

Category: search

Duplicate Key in Repeater Error [ngRepeat:dupes]

I’m guessing I’m getting an imaging error. I not sure of the source of the mistake. Note: Sometimes work smoothly, I often encounter this error. Form: <div class=”wrapper” ng-app=’afApp’ ng-controller=’afController’ style=”background: #F8F8F8;padding-top: 10px;”> <div class=”container-fluid”> <div class=”row”> <input type=”search” size=”40″ ng-model=”search” id=”search” autofocus=”autofocus” autocomplete=”off”> <section ng-repeat=”afData in afLoad | filter:search | limitTo:10″ ng-show=’search’ md-highlight-text=”search”> <div class=”row”> <div class=”col-sm-6 text-center”> <h2>{{afData.yil}}</h2> <h3>{{afData.sik1}}</h3> </div> <div class=”col-sm-6″> <p>{{afData.soru}}</p> </div> </div> </section> </div> </div> </div> Console [Browser]: Error: [ngRepeat:dupes] […]

Azure Search and CORS issues

I have developed an AngularJS web site that will call the Azure Search via the Search REST API. Using POSTMAN, I can search and add data to the Azure Search index without issue. When running my website as localhost (during development mode), I can also reach Azure Search no issue for GET but not PUT – this is understandable, it was documented on the Azure Search web site. Now that I have deployed my web […]

AngularJS Kendo UI Multiselect insert items into search result

Is it possible to insert item into search result, for example, I can search something like bbb and it gives me all items that contains this string. What I also want is to insert my own item into this search result, Select All for example. Here’s the code I got so far: this.selectItems = { placeholder: “Select items…”, autoClose: false, autoBind: false, dataTextField: “name”, dataValueField: “id”, filter: “contains”, dataSource: this.items }; Source: AngularJS

Implementing lazy loading treeview with AngularJS

I need a treeview with AngularJS that is able to fetch data by lazy loading and also has a search feature by lazy loading. According to the user input into the search textbox, I want the treeview to be initialized. For part one of this question: I mean lazy loading treeview. I use this theory: at first time loading treeview only with the most root node: <div class=”input-group”> <span class=”input-group-addon”><i class=”glyphicon glyphicon-search”></i></span> <input type=”text” id=”txtSearch” […]

Full text search in loopback on User model via MondoDB connector

I want to search my User collection via full text search on both the firstName and lastName property. I create my index like this: //connect to connector server.datasources.db.connector.connect(function (err, db) { //create index on firstName and lastName db.collection(‘User’).createIndex( { firstName: “text”, lastName: “text” }, function (err) { if (!err) { //run autoupdate on each model Promise.each(server.models(), function (model) { if (model.dataSource) { var autoupdate = Promise.promisify(model.dataSource.autoupdate); if (autoupdate) { console.log(“running autoupdate on model: ” + […]

How to filter with angularjs in nested Json

how to How to filter with angularjs in nested Json I need a query in nested a JSON array like following. I want to check if name is John and if hobbies have sport but it didn’t work. The result of following code like that: [ {“id”:1,”name”:”John”,”hobbies”:[{“kind”:”sport”},{“kind”:”music”}]}, {“id”:5,”name”:”John”,”hobbies”:[{“kind”:”swimming”},{“kind”:”opera”}]} ] but it must be {“id”:1,”name”:”John”,”hobbies”:[{“kind”:”sport”}{“kind”:”music”}]} function MyCtrl($scope, $filter) { $scope.items = [ {id:1, name:’John’,hobbies:[{kind:”sport”},{kind:”music”}]}, {id:2, name:’Steve’,hobbies:[{kind:”opera”},{kind:”theatre”}]}, {id:3, name:’Joey’}, {id:4, name:’Mary’}, {id:5, name:’John’,hobbies:[{kind:”swimming”},{kind:”opera”}]}]; $scope.filteredData = $filter(‘filter’)($scope.items, {name:’John’,hobbies:[{kind:”}]}); […]

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 […]

Next Page »