Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fivethree-team/ngxs-ionic-router-plugin
NGXS Ionic Router Plugin
https://github.com/fivethree-team/ngxs-ionic-router-plugin
angular ionic navigation ngxs plugin
Last synced: 3 months ago
JSON representation
NGXS Ionic Router Plugin
- Host: GitHub
- URL: https://github.com/fivethree-team/ngxs-ionic-router-plugin
- Owner: fivethree-team
- License: mit
- Created: 2019-01-23T09:40:35.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-11T02:34:14.000Z (over 3 years ago)
- Last Synced: 2024-08-09T10:31:29.850Z (6 months ago)
- Topics: angular, ionic, navigation, ngxs, plugin
- Language: TypeScript
- Homepage:
- Size: 759 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# IonicRouterPlugin for NGXS
[![npm version](https://badge.fury.io/js/%40fivethree%2Fngxs-ionic-router-plugin.svg)](https://www.npmjs.com/@fivethree/ngxs-ionic-router-plugin)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/fivethree-team/ngxs-ionic-router-plugin/blob/master/LICENSE)Router Plugin for Ionic 5 and NGXS 3.7.1 or higher.
| Angular | @ngxs/store | ionic | @fivethree/@fivethree/ngxs-ionic-router-plugin |
| ------- | ----------- | ----- | ---------------------------------------------- |
| 11 | 3.7.1+ | 5.x.x | 1.0.0 |
| 8/9 | 3.6.x+ | 5.x.x | 0.3.x |
| 8/9 | 3.6.x+ | 4.x.x | 0.2.x |
| 7 | 3.3.4+ | 4.x.x | 0.1.0 |## 📦 Installation
```console
npm install @fivethree/ngxs-ionic-router-plugin --save# or if you are using yarn
yarn add @fivethree/ngxs-ionic-router-plugin
```## 🔨 Usage
Import the module into your root application module:
```typescript
import { NgModule } from '@angular/core';
import { NgxsModule } from '@ngxs/store';
import { NgxsIonicRouterPluginModule } from '@fivethree/ngxs-ionic-router-plugin';@NgModule({
imports: [NgxsModule.forRoot(states), NgxsIonicRouterPluginModule.forRoot()]
})
export class AppModule {}
```Now the route will be reflected in your store under the `ionicRouter` state name.
## 🧠Navigation
`new NavigateRoot(path: string | UrlTree | any[], options?: NavigationOptions)`
`new NavigateForward(path: string | UrlTree | any[], options?: NavigationOptions)`
`new NavigateBackward(path: string | UrlTree | any[], options?: NavigationOptions)`
`new NavigateBack(options?: AnimationOptions)`