Posts

Showing posts with the label #Routing

Routing in Angular App

Hi Friends, This is Lakshman here. As part of the Series "Angular Best Practices". Today, We will Routing in Angular App . Pre-requisites: The pre-requisites are Node.JS - Click Here Angular CLI - Click Here VS Code - Click Here Check this out To know how to Handle Back-Forth Page Routing - click here To understand how to Structure your Angular App - click here Route There are certain things to remember when creating routing, At First, we need to place our routing module at the end of the imports array like below, imports: [ BrowserModule, HttpClientModule, BlockUIModule.forRoot(), // Import BlockUIModule ... AppRoutingModule ], If not, your routing may break your application routing flow. Make use of all elements as required as possible. Some properties as below, data Helps to send data to the component via routing resolve Helps to retrieve or fetch data required for component via API. canActivate Helps to restrict page ...

Implement Resolver in Angular

Hi Friends, This is Lakshman here. As part of the Series "Angular Best Practices". Today, We will Implement Resolver for your angular app . Pre-requisites: The pre-requisites are Node.JS - Click Here Angular CLI - Click Here VS Code - Click Here Creeate Resolver - Click Here Angular Snippets (Version 11) Click Here For Code Editor its VS Code . Resolver In Angular Application, every page requires some information to display it. By Default, every developer call service to fetch some information to display in OnInit Function inside Component. Most people forgot about Resolver itself. It helps our application to way better than you think. Service & Resolver has to be like bread & butter to Solve Data dependencies on Page Load. Things to know By default, we have the option to Create Resolver via Angular-CLI after cli version 11.0.5 or greater. Add Angular Snippets from Extension Marketplace. Each Resolver can have only one resolve method. Things to...

Handle Back-Forth Page Routing

Hi Friends, This is Lakshman here. It's been a long time since the last post, But it's good to see you all. Welcome back to the Series " Angular Best Practices ". Today, We will go through options to navigate between page back-forth page routing on App. Back-Forth Page Routing As we develop the application most probably, we will navigate between pages. The Usually Navigation options might be as below, * Header with All Navigation Option. * From Master to Detail, etc., If, our Angular App deployed as the Web Portal. The Navigation options will be the default because you can access only via Menus. What if, our angular app deployed as Mobile App. User can able to navigate not only via Page Menu and also via default back options. In this case, most probably, we may use a navigation service to maintain history. If you navigate a page via Phone's back options, it might cause an issue on the app. To Address the Issue, I have implemented the Session storage op...