Code Monkey home page Code Monkey logo

bug-guards-v17's Introduction

BugGuardsV17

When F5 or CTRL + R (Or in reload page in route /home) navigate for authComponent

This project was generated with Angular CLI version 17.0.9.

CLI

Angular CLI: 17.2.0
Node: 20.10.0
Package Manager: pnpm 8.13.1
OS: linux x64

Angular: 17.2.1
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.9
@angular-devkit/build-angular   17.2.0
@angular-devkit/core            17.0.9
@angular-devkit/schematics      17.0.9
@angular/cli                    17.2.0
@angular/ssr                    17.2.0
@schematics/angular             17.0.9
rxjs                            7.8.1
typescript                      5.2.2
zone.js                         0.14.4

Bug Description

Components

The components that make up the bug reproduction are similar to those in the development project. The minimalistic reproduction has the following components: AppComponent, HomeComponent, NavbarComponent, AuthComponent.

if token is valid and Router.navigate(['/auth']) is present in guard, occurs navigation for auth until the observable is resolved. After new navigate to homeComponent.

Objective

---
title: Auth Strategy
---
stateDiagram-v2
    Home --> Guard
    Guard --> Token
    Token --> exists

    exists --> yes
    exists --> no
    yes --> Home
    no --> Auth


    Guard --> Home


Loading

Running

stateDiagram-v2
    Home --> Guard
    Guard --> AuthComponent: If Router.navigate includes in guard,\n redirect to AuthComponent


    AuthComponent --> Token
    Token --> yes
    Token --> no


    yes --> Home: If token is valid,\n redirect a HomeComponent.\n\n Press F5 or CTRL + R for view bug
    no --> AuthComponent

    AuthComponent --> Guard

    Home --> Bug: Render UI Broken


Loading

bug-guards-v17's People

Contributors

gkigor avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.