1.2.1 • Published 3 years ago

universal-navigate v1.2.1

Weekly downloads
8
License
BSD-3-Clause
Repository
-
Last release
3 years ago

universal-navigate npm

Route navigation capability implementation.

Support

Install

$ npm install universal-navigate --save

Usage

import Navigate from 'universal-navigate';

Navigate.push({
  url: 'https://www.taobao.com/',
  animated: true // Only supported in weex
}).then(() => {
});

Navigate.pop({
  animated: false // Only supported in weex
}).then(() => {
});

Navigate.go({
  step: -1,
  animated: false // Only supported in weex
}).then(() => {
});

Methods

push(options)

Arguments

PropertyTypeDescriptionrequiredDefaultSupported
optionsobjectPush function argumentstrue-
options.urlstringThe page URL.true-
options.animatedbooleanSupport only in weex, whether animated effects are required when pages are pressedfalsetrue

pop(options)

Arguments

PropertyTypeDescriptionrequiredDefaultSupported
optionsobjectPop function argumentsfalse-
options.animatedbooleanSupport only in weex, whether animated effects are required when pages are pressedfalsetrue

go(options)

Arguments

PropertyTypeDescriptionrequiredDefaultSupported
optionsobjectGo function argumentstrue-
options.stepnumberThe number of forward steps is positive and only supports the web, and the number of backward steps is negative.true-
options.animatedbooleanSupport only in weex, whether animated effects are required when pages are pressedfalsetrue