Posts

Alias

Image
I hope you' all are good. stay home stay safe. let's get into our topic Alias when we are developing we usually import our interfaces/services/components right. everyone will do this but how you're doing is the point here. for example, assume you're working on a big project which has more than 20-30 components and its folder structure is nested for 2 levels like that. if you want to import an interface you need to type all those ../../ etc; like this, you have to do. it is really a time taking and confusing at some point like these situations will come. it's really a headache for developers to import services/components/modules/interfaces like this. there is a better approach for these kinds of things and actually angular provides a better way to import and but be careful when developing.     let's see an example in general we all do the import. now I will also do the same thing here. I am taking an apiservice it has logic to make an API call but here we no ne...

ngx encrypt cookie

Image
    Thank you checking my  blog. I got some really cool feature library that makes our development more easy. In general we use cookies to store token value / email / or any thing that we require to perform on our web application. we also keep expire date when will or till the date cookie will live , if the expire date arrives it will remove the value automatically cool right but some times we not use cookies because user can manipulate the cookie value or its possible to change cookie values. it happens because the cookie value is human readable. so here i brought an solution to this so we can store cookies but it will not be a human readable string.so lets see "How to store encrypted value in cookies or How to encrypt a value to store in cookies"                                           ...