How can I search names starting from first letter that user types, I want to know if user types B then names starting from B must be displayed rather than "SBI" word where B comes in second position. I want to search specific words which has first word match.
for example: if
list ={SBI,
BSI,
isb,
bsisib,
be happy,
dont worry,
hello}
Then If i type h character then I want all the words starting from 'h'. but when i tried it shows 'be happy' 'hello' result for h. I want hello only. Thank you
If you're list isn't extremely long try applying a regular expression on each item in ng-repeat filter.
Not sure if you want first word or first character in each word.
Try the following plunker.
If you are using this on input field, then
I suggest you to use an existing autocomplete solution for angularjs. There are many of them out there and are quite easy to use.
http://ngmodules.org/modules/ngAutocomplete
Plunkr:http://plnkr.co/edit/il2J8qOI2Dr7Ik1KHRm8?p=preview
http://angular-ui.github.io/bootstrap/
Check the typeahead from angular ui bootstrap.
Or just google angularjs autocomplete, you will find tons of results.
Related
I'm trying to write a cell formula which can essentially create a single playlist of songs.
Currently the songs are grouped by decade, but I'd like to be able to see a single list of everything that has been ticked.
I tried an array formula, but it only returned the first ticked song. Plus not sure how to make the array formula include the adjacent lists.
I tried a FILTER function, it works for one list of songs, but I don't know how to get it to append the other lists on the end.
Could I use a QUERY function? Not sure how though.
Many thanks!
try:
={"LIST"; FILTER({C:C; F:F}; {B:B; E:E}=TRUE)}
awesome question! You were super close in your filter example, one more filter in your array would've done it :)
Example Image:
Example Formula:
={"LIST"; FILTER(C:C, B:B=TRUE); FILTER(F:F, E:E=TRUE)}
Is it possible, with uib-typeahead, to match results as long as what is being typed matches any word in a source array's item? For the location example used in the documentation, I'd like to be able to type ne yo and see New York as one of the typeahead suggestions, because both words i entered match with words in New York.
If not possible, is there a similar alternative which can accomplish this
I'm wondering about way to edit multiple selections but with different texts
For example:
arr=['hi','i','am','your','array','can','change','me','quickly','please']
arr=['test1','text','foo','test','fast','yes','test2','test3','text2','text3']
I have array of ten elements and I want to change them all with different texts.
Ordinary way to select one then change it. If you use multiple selections all of them are replaced with the same new text.
The question there: any way to change them faster?
I think there may be a way to change it like Emmet in HTML when you enter Emmet code PhpStorm convert it and take you inside red box in each element to write inside it one by one.
i have found the solution to make it easily to edit the array
just using the find ctrl+f and then use f3 to get next value to edit
in the search we can enter the regular expression that will find any matched values
(?<=')\w+(?=')|(?<=,)\w+(?=,)|(?<=\[)\w+(?=,)|(?<=,)\w+(?=])
(?<=')\w+(?=') : any text inside single quotes symbol ' can be changed double "
(?<=,)\w+(?=,): any word between commas for numbers and variables in the array
(?<=\[)\w+(?=,): the first element of the array if it as number or variable
(?<=,)\w+(?=]) : the last element in the array if it as number or variable
| : or operator
i am trying to use angular ui.mask module to display a full length url based on user entering a section name(suffix)
http://www.example.com/XYZ where 'XYZ' is the user input.
While a mask 'http://www.example.com/AAA' works fine, it does limit the user to entering only 3 character.
Any quick ways to extend the length accepted?
I tried altering the regex to accept variable length, but haven't got this working.
Any help would be appreciated.
Thanks.
This can be accomplished by using a question mark before any character in the mask that would be optional.
In your case, it would look like:
ui-mask='http://www.example.com/?A?A?A?A?A?A?A?A?A?A?A?A?A?A?A?A'
Better late than never...
Is there a limitation with the number of values within an angular orderby predicate? I can't get anything with more than 2 fields to work. Meaning anything past the 2nd index doesn't work. If I shift the fields around and put the one that is 3rd to first it works.
Example:
['VendorName','ProductName','-ProductCost']
The value in the 3rd position or index 2 appears to be ignored unless i move it within the 1st or 2nd positions of the array. I could be completely overlooking something, but I can't get it to work. The first two fields work fine.
Any info would be greatly appreciated.
Seems to work correctly in this Plunker:
http://plnkr.co/edit/nHBQrJKXuGNkZ55VNPl8?p=preview
Click the Sort Name, Phone, Age button.