2.7.0 • Published 7 years ago

alauda v2.7.0

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

alauda NPM version

tools for webapps

Dependency Status Dependency ci Status

Install

npm install --save alauda

Usage

History

import { on, start, navigate } from 'alauda/history';

start(); // start listening for history changes

// listen for history changes
on('redirect', function(url) {
    console.log(url);
});

// example with ga
on('changed', function(url) {
    _gaq.push(['_trackPageview', url]);
})

navigate('/'); // indicate to the browser to change url
navigate('/', true); // indicate to the browser to change url by replacing the current one

Web app

Use history to navigate and redirect

import { init, redirect } from 'alauda/web-app';

init((url) => {
    console.log(url);
});

redirect('/'); // manually ask for a redirect of url
2.7.0

7 years ago

2.6.0

7 years ago

2.5.0

7 years ago

2.4.0

7 years ago

2.3.0

8 years ago

2.2.0

8 years ago

2.0.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago

0.0.1

9 years ago