mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 21:03:03 -05:00
Additions/55 back button navigation (#1016)
feat: new angular back button navigation challenge
This commit is contained in:
5
docs/src/content/authors/Ioannis-Tsironis.json
Normal file
5
docs/src/content/authors/Ioannis-Tsironis.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Ioannis Tsironis",
|
||||
"github": "https://github.com/tsironis13",
|
||||
"linkedin": "https://www.linkedin.com/in/giannis-tsironis/"
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: 🟠 Back-Button-Navigation
|
||||
description: Challenge 55 is about overriding browser back button navigation
|
||||
author: Ioannis-Tsironis
|
||||
contributors:
|
||||
challengeNumber: 55
|
||||
command: angular-back-button-navigation
|
||||
sidebar:
|
||||
order: 123
|
||||
badge: New
|
||||
---
|
||||
|
||||
## Information
|
||||
|
||||
The goal of this challenge is to override the default behavior of the browser back button in Angular applications.
|
||||
|
||||
We have been prompted by the team's PO to provide a specific implementation when displaying dialog components and
|
||||
native browser back button is clicked. Currently, Angular's default behavior when the native back button is clicked is
|
||||
to remove the current history entry and go back to the previous route.
|
||||
|
||||
The initial state of the application is as follows:
|
||||
When any dialog is displayed and the back button is clicked, any opened dialog is closed, and the app redirects to the previous page.
|
||||
|
||||
This behavior should be changed according to these requirements:
|
||||
|
||||
1. The requirements dictate a few different behaviors depending on which type of dialog is currently visible.
|
||||
2. For example, we have a simple
|
||||
action dialog that should be closed on the back button click, but we **MUST** remain on the current visited route (/simple-action).
|
||||
3. In addition, we have sensitive dialogs like the one on the '/sensitive-action' page that must open a confirmation dialog on a back button click.
|
||||
4. The confirmation dialog in combination with the back button click should behave like the simple dialog action one; the confirmation dialog must be closed, and we must remain on the '/sensitive-action' page with the initial dialog still visible.
|
||||
|
||||
## Statement
|
||||
|
||||
Provide an abstract, generic approach to handling any type of dialog behavior when the native browser back button is clicked.
|
||||
Some Typescript design patterns, in combination with the Angular features, could be utilized to support this kind of infrastructure.
|
||||
|
||||
## Constraints
|
||||
|
||||
- The implementation must not be static depending on the 2 dialog type behaviors presenting on this challenge but also scalable to support any
|
||||
new behavior requirements may arise in the future.
|
||||
|
||||
### Hint
|
||||
|
||||
<details>
|
||||
<summary>Hint 1</summary>
|
||||
Use the `CanDeactivate` functional guard
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Hint 2</summary>
|
||||
Material Design dialog documentation can be found [here](https://material.angular.io/components/dialog/overview)
|
||||
</details>
|
||||
@@ -9,7 +9,6 @@ challengeNumber: 54
|
||||
command: signal-pipe-observable-to-signal
|
||||
sidebar:
|
||||
order: 210
|
||||
badge: New
|
||||
---
|
||||
|
||||
## Information
|
||||
|
||||
@@ -13,7 +13,7 @@ hero:
|
||||
icon: right-arrow
|
||||
variant: primary
|
||||
- text: Ir al Desafío más reciente
|
||||
link: /es/challenges/signal/54-pipe-observable-to-signal/
|
||||
link: /es/challenges/angular/55-back-button-navigation/
|
||||
icon: rocket
|
||||
- text: Dar una estrella
|
||||
link: https://github.com/tomalaforge/angular-challenges
|
||||
@@ -26,8 +26,8 @@ import MyIcon from '../../../components/MyIcon.astro';
|
||||
import SubscriptionForm from '../../../components/SubscriptionForm.astro';
|
||||
|
||||
<CardGrid>
|
||||
<Card title="54 Desafíos">
|
||||
Este repositorio contiene 54 Desafíos relacionados con <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> y <b>Typescript</b>.
|
||||
<Card title="55 Desafíos">
|
||||
Este repositorio contiene 55 Desafíos relacionados con <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> y <b>Typescript</b>.
|
||||
Estos desafíos se resuelven en torno a problemas de la vida real o características específicas para mejorar tus habilidades.
|
||||
</Card>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ hero:
|
||||
icon: right-arrow
|
||||
variant: primary
|
||||
- text: Aller au dernier Challenge
|
||||
link: /fr/challenges/signal/54-pipe-observable-to-signal/
|
||||
link: /fr/challenges/angular/55-back-button-navigation/
|
||||
icon: rocket
|
||||
- text: Donne une étoile
|
||||
link: https://github.com/tomalaforge/angular-challenges
|
||||
@@ -26,8 +26,8 @@ import MyIcon from '../../../components/MyIcon.astro';
|
||||
import SubscriptionForm from '../../../components/SubscriptionForm.astro';
|
||||
|
||||
<CardGrid>
|
||||
<Card title="54 Défis">
|
||||
Ce répertoire rassemble 54 Défis liés à <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> et <b>Typescript</b>. Ces défis portent sur des problèmes réels ou des fonctionnalités spécifiques pour améliorer vos compétences.
|
||||
<Card title="55 Défis">
|
||||
Ce répertoire rassemble 55 Défis liés à <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> et <b>Typescript</b>. Ces défis portent sur des problèmes réels ou des fonctionnalités spécifiques pour améliorer vos compétences.
|
||||
</Card>
|
||||
|
||||
<Card title="Subscribe to get notify of latest challenges">
|
||||
|
||||
@@ -13,7 +13,7 @@ hero:
|
||||
icon: right-arrow
|
||||
variant: primary
|
||||
- text: Go to the latest Challenge
|
||||
link: /challenges/signal/54-pipe-observable-to-signal/
|
||||
link: /challenges/angular/55-back-button-navigation/
|
||||
icon: rocket
|
||||
- text: Give a star
|
||||
link: https://github.com/tomalaforge/angular-challenges
|
||||
|
||||
@@ -13,7 +13,7 @@ hero:
|
||||
icon: right-arrow
|
||||
variant: primary
|
||||
- text: Ir para o desafio mais recente
|
||||
link: /pt/challenges/signal/54-pipe-observable-to-signal/
|
||||
link: /pt/challenges/angular/55-back-button-navigation/
|
||||
icon: rocket
|
||||
- text: Dar uma estrela
|
||||
link: https://github.com/tomalaforge/angular-challenges
|
||||
@@ -26,8 +26,8 @@ import MyIcon from '../../../components/MyIcon.astro';
|
||||
import SubscriptionForm from '../../../components/SubscriptionForm.astro';
|
||||
|
||||
<CardGrid>
|
||||
<Card title="54 Desafios">
|
||||
Este repositório possui 54 Desafios relacionados a <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>,
|
||||
<Card title="55 Desafios">
|
||||
Este repositório possui 55 Desafios relacionados a <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>,
|
||||
<b>Ngrx</b> e <b>Typescript</b>.
|
||||
Esses desafios são voltados para problemas reais ou funcionalidades específicas afim de
|
||||
melhorar suas habilidades.
|
||||
|
||||
@@ -13,7 +13,7 @@ hero:
|
||||
icon: right-arrow
|
||||
variant: primary
|
||||
- text: Перейти к последней задаче
|
||||
link: /ru/challenges/signal/54-pipe-observable-to-signal/
|
||||
link: /ru/challenges/angular/55-back-button-navigation/
|
||||
icon: rocket
|
||||
- text: Добавить звезду
|
||||
link: https://github.com/tomalaforge/angular-challenges
|
||||
|
||||
Reference in New Issue
Block a user