https://github.com/estruyf/spfx-navigation
SharePoint Framework navigation helper
https://github.com/estruyf/spfx-navigation
navigation sharepoint sharepoint-framework
Last synced: about 1 year ago
JSON representation
SharePoint Framework navigation helper
- Host: GitHub
- URL: https://github.com/estruyf/spfx-navigation
- Owner: estruyf
- License: mit
- Created: 2019-02-27T15:04:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-10-18T13:31:03.000Z (over 4 years ago)
- Last Synced: 2024-10-12T08:28:46.805Z (over 1 year ago)
- Topics: navigation, sharepoint, sharepoint-framework
- Language: TypeScript
- Size: 15.6 KB
- Stars: 15
- Watchers: 3
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Managing navigation in SharePoint Framework projects
[](https://nodei.co/npm/spfx-navigation/)
SharePoint Framework handles it own navigation events. If you want to redirect from your code to another page, it will trigger a full page reload when you use `location.href = ""`. This dependency allows you to define how you want to navigate to the page with partial or full page reloads.
## Installation
Run the following command to install the `spfx-navigation` dependency:
```
npm i spfx-navigation -S -E
```
## Usage
Once the dependency is installed to your project, you can make use of it as follows:
```typescript
import { Navigation } from 'spfx-navigation';
/* Navigation with partial page reload */
Navigation.navigate("");
/* Navigation with full page reload */
Navigation.navigate("", true);
```
## Issues
Experiencing issues? Please add these to the dependency its issue list: [SPFx navigation issues](https://github.com/estruyf/spfx-navigation/issues).
## Changes
### 1.2.2
- Fix build in the GitHub workflow