49. Navigate between pages using router programmatically in Typescript code in angular

49. Navigate between pages using router programmatically in Typescript code in angular

Leela Web Dev

3 года назад

41,747 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Shaik Sayyad Baba Sharief
Shaik Sayyad Baba Sharief - 01.06.2023 16:05

How can we open/navigate to the route in a new window with query params. Please suggest

Ответить
Ramya Pavani
Ramya Pavani - 14.04.2023 00:42

What can be done if we want to stay on the first tab whenever we click on the option from side nav. Please suggest.

Ответить
zahid sheikh
zahid sheikh - 20.12.2022 08:18

Love from kashmir

Ответить
zahid sheikh
zahid sheikh - 20.12.2022 08:18

Thanks a lot sir

Ответить
Shubham Tiwari
Shubham Tiwari - 24.03.2022 08:29

sir plzz give me source code

Ответить
epione pharma
epione pharma - 10.11.2021 23:09

in case we use navigate method not navigatebyurl , is there any way to make the route name fed as a variable not a direct text

Ответить
mohit gharate
mohit gharate - 21.05.2021 16:21

When I import Router in ts file then it gives error
Error: src/app/users/users.component.ts:2:23 - error TS1149: File name 'D:/angularProject/angularrouting/node_modules/@angular/router/router.d.ts' differs from already included file name 'D:/angularProject/angularrouting/node_modules/@angular/Router/router.d.ts' only in casing.
The file is in the program because:
Imported via '@angular/Router' from file 'D:/angularProject/angularrouting/src/app/app.module.ts' with packageId '@angular/router/[email protected]'
Imported via '@angular/Router' from file 'D:/angularProject/angularrouting/src/app/app.component.ngtypecheck.ts' with packageId '@angular/router/[email protected]'
Imported via "@angular/router" from file 'D:/angularProject/angularrouting/src/app/users/users.component.ts' with packageId '@angular/router/[email protected]'

2 import{ Router } from "@angular/router";
~~~~~~~~~~~~~~~~~

src/app/app.module.ts:3:38
3 import { Routes, RouterModule } from '@angular/Router';
~~~~~~~~~~~~~~~~~
File is included via import here.
src/app/app.component.ngtypecheck.ts:2:21
2 import * as i1 from '@angular/Router';
~~~~~~~~~~~~~~~~~
File is included via import here.

Ответить