Angly
  • Angly - Angular 8 Multipurpose Template
  • Introduction
  • Getting Started
  • Start Building
  • Style Customization
  • Rtl Layout
  • Routing/Navigation
  • Third Party Modules
  • Code Customizing
    • Home page
    • Page Template
  • Still problem ?
  • Changelog
Powered by GitBook
On this page

Routing/Navigation

Angly is compatible with parameter routing. There are followings steps:

PreviousRtl LayoutNextThird Party Modules

Last updated 6 years ago

1. Go to src >> app >> and open app.routing.ts file and add routing like this:-

{ path: 'about/:keyword',component: AboutComponent }

For Reference:

2. If you want to use this routing in component then go to src >> app >> and open component.ts file then do the followings:-

a) Add the the routing at top of the file like this:

import { Router} from '@angular/router';
constructor(private router: Router){}

b) Add in your desire component and add these line of code in your function:- For Example:-

gotoAbout(){
  this.router.navigate(['/about'], { queryParams: { keyword: 'Test' } });
}

For Reference :- https://alligator.io/angular/query-parameters/

https://angular.io/guide/router