Add Filtering and Sorting using angular pipes

  Рет қаралды 31,596

Study Mash

Study Mash

Күн бұрын

Пікірлер: 72
@iUmerFarooq
@iUmerFarooq Жыл бұрын
Neatly explained. Thank you very much Sir Lots of Love from Pakistan
@tadaaa.6580
@tadaaa.6580 2 жыл бұрын
Thank you sir! The way you explain this filtering and sorting is clear like water
@StudyMash
@StudyMash 2 жыл бұрын
Glad to hear that buddy
@SoraRaida
@SoraRaida 2 жыл бұрын
Thanks a lot for this! Definitely saved me
@lipunpatel5937
@lipunpatel5937 3 жыл бұрын
Nice tutorials, very informative, Thank you Sir
@MrArdo-branch-main
@MrArdo-branch-main 3 жыл бұрын
OMG I hope my teacher can teach like this..Thank you so much sir.. my teacher: 1 year vs Study Mach: 30 minutes ;p
@StudyMash
@StudyMash 3 жыл бұрын
Great
@missphantomhive2796
@missphantomhive2796 3 жыл бұрын
Loving this channel and the videos! Thanks a lot sir!
@StudyMash
@StudyMash 3 жыл бұрын
Glad to hear that you are loving it, thanks for taking time out for appreciation.
@poonamchaurasia2484
@poonamchaurasia2484 3 жыл бұрын
Great videos thanks a lot Sir 🙂
@vaishalir7323
@vaishalir7323 4 жыл бұрын
superb,great video
@vaishalir7323
@vaishalir7323 4 жыл бұрын
Coding : Angular Problem statement 1. Build a production ready angular app, which has a dropdown with a list of users sorted in Alphabetical order. ( Use API 1: reqres.in/api/users?page=1) 2. On click of one of the items display the user details in a new page as label and value ( Use API 2: reqres.in/api/users/) 3. Use separate component for dropdown and display of user details API 1 : reqres.in/api/users?page=1 API 2 :reqres.in/api/users/ 4. Write a sample unit Test case & End to end test cases for the same
@arunsarkar5573
@arunsarkar5573 3 жыл бұрын
After i watche this video i just go for subscribe its owesom 👌.
@silkchannel4780
@silkchannel4780 3 жыл бұрын
Amazing 👌👌
@oliverdjbrown
@oliverdjbrown 4 жыл бұрын
change from if (item[propName] === filterString) { resultArray.push(item); } to if (item[propName].toLocaleLowerCase() === filterString.toLocaleLowerCase()) { resultArray.push(item); } so you can filter low and upper case
@StudyMash
@StudyMash 4 жыл бұрын
Great, thanks for sharing this
@cherrbatac7721
@cherrbatac7721 4 жыл бұрын
@@StudyMash Pretty new to filter with pipe. Can you show how I can remove duplicates from view using buttons? Like let's say in this instance. It can NY can print or output twice. What if I want a button showing NY and then filter your results to show NY only when that button is clicked. Are you able to help :)? It would be much appreciated. I've trying to find a solution for this, but can't find any. THank you.
@rahulthawani1104
@rahulthawani1104 2 жыл бұрын
hi sir I have one query that ....in sort pipe why we have taken value: Array as string of array i have console log this value argument which is IPropertyBase object not array of string. How is it possible. 0: {Id: 3, SellRent: 1, Name: 'Gun Hill', PType: 'House', BHK: 3, …} 1: {Id: 4, SellRent: 1, Name: 'Macro Home', PType: 'Duplex', BHK: 4, …}
@chebbitaha8293
@chebbitaha8293 2 жыл бұрын
thnxxxxx u r the best
@greencoder3795
@greencoder3795 3 жыл бұрын
Sir how to clear filter applied on kendo grid when click on clearfilter button ?
@scottmacintyre7385
@scottmacintyre7385 2 жыл бұрын
Great tutorial! I'm using an observable data array in my table . Your code doesn't seem to work with "async". Any suggestions of how to get it to work?
@rodrogo3029
@rodrogo3029 4 жыл бұрын
Hello sir, how are you? great video! One question though... Do you know if we can filter a city LIKE some portion of the city name? For example if we search for "new" it retrieve New York as posible result (Yes the upper case was intencional) Thanks in advance
@ravv27
@ravv27 3 жыл бұрын
Hey Rodrogo, I have the same question as you...did you guys manage to find a solution for it? thanks
@tadaaa.6580
@tadaaa.6580 2 жыл бұрын
@@ravv27 actually you can set it to lower/ upper case before filter it. From Saibel answer: for (const item of value) { let lowerProperty = item[propertyName]?.toLowerCase(); let lowerFilter = filterString?.toLowerCase(); if (lowerProperty?.includes(lowerFilter)) resultArray.push(item); }
@mohit-1-8
@mohit-1-8 2 жыл бұрын
Which extension did you used, to generate the pipes?
@StudyMash
@StudyMash 2 жыл бұрын
here are the extensions i have used in this project : kzbin.info/www/bejne/nZTbpHeedqySjZo Let me know if you still have any question
@Tournesol143
@Tournesol143 4 жыл бұрын
Were you going to add a link for unknown vs any?
@StudyMash
@StudyMash 4 жыл бұрын
Not sure how the link was deleted from video description, I have added the same back.
@Tournesol143
@Tournesol143 4 жыл бұрын
@@StudyMash Many thanks, Sandeep!
@Pragya_Empower_Studies
@Pragya_Empower_Studies 3 жыл бұрын
thanks you so much...
@StudyMash
@StudyMash 3 жыл бұрын
Welcome Pragya. 5AM club, I read this book last week only 😀
@valerigelovani8794
@valerigelovani8794 4 жыл бұрын
tnx Mash
@NayanJoshi24
@NayanJoshi24 4 жыл бұрын
Hi , I have one doubt we have not passed the array(first arg) to transform method filter. In my case it is not able to find the value of type any[] , as we are not passing . So it is not giving me any result. Please suggest what needs to be done.
@StudyMash
@StudyMash 4 жыл бұрын
You means, you are not getting any results on load and when you type the desired city, it is appearing in results?
@NayanJoshi24
@NayanJoshi24 4 жыл бұрын
Yes I am getting zero result, when tried debugging i found it is iterating over empty array. I am working similar site nit the same example which you have shown. In my case we are getting the array/data from api through service and is currently displaying on load but filter is not working if i use pipe filter with only 2 value pass “filterstring” and “attributid”
@StudyMash
@StudyMash 4 жыл бұрын
If you can send me code on sandeep@studymash.com, I can look it where the issue is
@NayanJoshi24
@NayanJoshi24 4 жыл бұрын
Study Mash sure thanks!
@yosephkefale2041
@yosephkefale2041 3 жыл бұрын
Hey mash , i am really in love ith this tutorial but now while working on pipes , i am facing error 'Expected 3 arguments, but got 2.' on my property-list component , while adding the filter to the ngfor any advice
@StudyMash
@StudyMash 3 жыл бұрын
Hi Yoseph, glad to hear you are liking it, could you please provide me the github link to your code so that I can look at the problem
@YarikASMRPOMIRCHIY
@YarikASMRPOMIRCHIY 2 жыл бұрын
how have you fixed it? facing the same error
@honeymilktea07
@honeymilktea07 7 ай бұрын
I too am getting the same error, how did you solve it?
@saipriyagoud4777
@saipriyagoud4777 3 жыл бұрын
I am not able to sort the data which I have taken from json. Can you please help
@StudyMash
@StudyMash 3 жыл бұрын
Definitely, can you share the github link of your code so that I can look where the issue is?
@greencoder3795
@greencoder3795 3 жыл бұрын
Can u send me the code to clear filter of kendo grid when clicking on clear filter button
@StudyMash
@StudyMash 3 жыл бұрын
Sorry, I have no idea about it
@klbaiju
@klbaiju 3 жыл бұрын
Filter is not working properly iam getting this error core.js:4197 ERROR TypeError: value is not iterable at FilterPipe.transform (filter.pipe.ts:16) at pureFunction3Internal (core.js:24548) at Module.ɵɵpipeBind3 (core.js:24714) at PropertyListComponent_Template (property-list.component.html:2) at executeTemplate (core.js:7303) at refreshView (core.js:7172) at refreshComponent (core.js:8326) at refreshChildComponents (core.js:6965) at refreshView (core.js:7222) at refreshEmbeddedViews (core.js:8280)
@eswar338
@eswar338 4 жыл бұрын
Sorting and Searching working but I am getting below errors in the console ERROR TypeError: Cannot read property 'length' of undefined core.js:4197 ERROR TypeError: Cannot read property 'sort' of undefined
@StudyMash
@StudyMash 4 жыл бұрын
You will have to check value before performing sorting on value to get this resolved, providing below the latest code I updated in subsequent sections github.com/webtrainer-in/HSPA/blob/master/Frontend/src/app/Pipes/sort.pipe.ts
@eswar338
@eswar338 4 жыл бұрын
@@StudyMash yes,got it .. can u please tell me the solution about password comparison validator issue fixing . and navigation bar toggle not working in responsive mobile view
@StudyMash
@StudyMash 4 жыл бұрын
Toggle button issue I will fix in upcoming videos. Can you give me the github link to repository so that I can look validator problem.
@vaynard94
@vaynard94 4 жыл бұрын
i thought there are no video this week :D Btw any clue when back end tutorial will be start? Im very curious with your api server approach keep it up bro!
@StudyMash
@StudyMash 4 жыл бұрын
Yup, it got little late because of very hectic last week :) . Will start on API part next to next week.
@vaynard94
@vaynard94 4 жыл бұрын
@@StudyMash so the API part is going to be uploaded on 23 Augt? That will be great! Good news! I cannot wait to watch it hehehe
@StudyMash
@StudyMash 4 жыл бұрын
Yup
@LoganX00
@LoganX00 3 жыл бұрын
One small thing. This sorting does not work properly for all number values, as its using a string compare. Below is what I used to turn the string into a number if it's a number, and to a lower case string if its a string. value.sort((a: any, b: any) => { let aField; if (isNaN(a[sortField])){ aField = a[sortField].toLowerCase(); }else{ aField = +a[sortField] } let bField; if (isNaN(b[sortField])){ bField = b[sortField].toLowerCase(); }else{ bField = +b[sortField] } if(aField < bField){ return -1 * multiplier; } else if (aField > bField) { return 1 * multiplier; }else{ console.log("Same"); return 0; } });
@zaharivaklinov
@zaharivaklinov 2 жыл бұрын
Bless you (:
@vaishalir7323
@vaishalir7323 4 жыл бұрын
hi sir ,i have one interview question if you have time make one video
@StudyMash
@StudyMash 4 жыл бұрын
Hi, what is that question?
@vaishalir7323
@vaishalir7323 4 жыл бұрын
Coding : Angular/ReactJS Problem statement 1. Build a production ready angular app, which has a dropdown with a list of users sorted in Alphabetical order. ( Use API 1: reqres.in/api/users?page=1) 2. On click of one of the items display the user details in a new page as label and value ( Use API 2: reqres.in/api/users/) 3. Use separate component for dropdown and display of user details API 1 : reqres.in/api/users?page=1 API 2 :reqres.in/api/users/ 4. Write a sample unit Test case & End to end test cases for the same
@StudyMash
@StudyMash 4 жыл бұрын
@@vaishalir7323 this is already there in this tutorial except #4. Unit test.
@vaishalir7323
@vaishalir7323 4 жыл бұрын
ok sir
@saibel129
@saibel129 2 жыл бұрын
I think you can use .includes() in search for (const item of value) { let lowerProperty = item[propertyName]?.toLowerCase(); let lowerFilter = filterString?.toLowerCase(); if (lowerProperty?.includes(lowerFilter)) resultArray.push(item); }
Deploy Angular Application to Firebase hosting for free
12:43
Study Mash
Рет қаралды 26 М.
Angular Server Side Filter , Sorting & Pagination | Angular Tutorial
34:37
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Filtering and Sorting in Angular (ngx modules)
16:48
Oc Dev
Рет қаралды 9 М.
Implementing Search Functionality | Data Binding | Angular 12+
13:44
What is Observable | Observables | Angular 12+
14:16
procademy
Рет қаралды 162 М.
Save Data to Local Storage in Angular | Angular Tutorial
17:12
Study Mash
Рет қаралды 58 М.
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 821 М.
How to use search filter pipe in Angular ?
7:20
The Angular - Info
Рет қаралды 10 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН