Posts

Showing posts from April, 2021

Example Filter,sort,map Observable stream

Example 1 sort array of object alphapitaclly . Array of countries     findAllCountry ( token :  string ):  Observable < ICountry []> {      const   headerInfo  =  new   HttpHeaders ({        Authorization :   token ,     });      return   this . http       . get < ICountry []>(          ` ${ environment . backendUrl } /crm-operations/lookup/country` ,         {  headers :   headerInfo  }       )       . pipe (          tap (( data )  =>            data . sort (( a ,  b )  =>  {           ...

Upgrade From Capacitor V2 to V3

-- First Check the current version npx cap doctor -- Then install the new version of capacitor npm install @capacitor/cli@next @capacitor/core@next     -- and install the new version of capacitor/android npm install @capacitor/android@next -- check again npx cap doctor   --every this is ok? Then install pluggins you want  npm install @capacitor/keyboard npm install @capacitor/haptics  npm install @capacitor/app npm install @capacitor/storage   -- after all updates done , Sync the project npx cap sync -- if you want to check for the latest updates,run  npx npm-check-updates -u  -- then  npm install npm install -- of any problems occure due to update  of typescript , youcan downgrade type script like this //downgrade typescript version npm install typescript@">=4.0.0 <4.2.0" -- replace " with ' in linux   // removing plugin 1- remove it from package.json 2- npm uninstall <<plugin name ecample action-sheet...