![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
ngx-back-button
Advanced tools
A library for handling a proper angular back button capability 1. Handle Browser history 2. Handle `Fallback` when clicking on the back button when not routed yet 3. Handle custom `Fallback`
A library for handling a proper angular back button capability
Fallback
when clicking on the back button when not routed yetFallback
npm install ngx-back-button
Inside your app.module.ts
file.
import { NgxBackButtonModule, NgxBackButtonService } from 'ngx-back-button'
imports: [
NgxBackButtonModule.forRoot(), // Default rootUrl === '/'
// Or
NgxBackButtonModule.forRoot({
rootUrl: '/custom', // Or any custom root url
fallbackPrefix: '/tabs' // For libraries users
}),
],
providers: [
{
provide: APP_INITIALIZER,
useFactory: () => () => null,
deps: [NgxBackButtonService],
multi: true,
},
]
The default fallback in case your landing on the page and have nothing to go back to
Added to the fallback argument.
Use: If you're building a library, wish to put some back button with fallback.
Let say, you build a component that have the following
<button ngxBackButton="/login">
Back to login
</button>
But inside your app, you always have the /tabs
first.
Adding fallbackPrefix: '/tabs'
will be the same as if you were doing the following
<button ngxBackButton="/tabs/login">
Back to login
</button>
Wherever you plan to use the back button logic
import { NgxBackButtonModule } from 'ngx-back-button'
imports: [
NgxBackButtonModule,
]
Then you can use it in two different way
Normal use
<button ngxBackButton>
Back button
</button>
With Fallback
<button ngxBackButton="/login">
Back to login
</button>
// foo.component.ts
import { NgxBackButtonService } from 'ngx-back-button'
// ...
constructor(public ngxBackButtonService: NgxBackButtonService) {}
Normal use
<button (click)="ngxBackButtonService.back()">
Back button
</button>
With Fallback
<button (click)="ngxBackButtonService.back('/login')">
Back to login
</button>
FAQs
A library for handling a proper angular back button capability
The npm package ngx-back-button receives a total of 23 weekly downloads. As such, ngx-back-button popularity was classified as not popular.
We found that ngx-back-button demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.