1.0.2 • Published 5 years ago

com.dwm.it.plugin.deeplink v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Description

This plugin is a fusion of cordova-plugin-deeplinks and cordova-plugin-browsertab.

The plugin is used to operate a redirection via browserTab on a deeplink.

Usage

BrowserTab

public close() {
 (<any>window).DeeplinkPlugin.close();
}

private _open(url: string) {
 (<any>window).DeeplinkPlugin.openUrl(url);
}

Deeplink

const routes = {
    '/callback': 'KeycloakController',
    '/callback-logout': 'KeycloakController',
    'profile': 'ProfilePage',
    'my-orders': 'OrdersPage',
};
(<any>window).DeeplinkPlugin.route(routes,
    (match) => {
        console.log('DEEPLINKS MATCH !!', match);
    },
    (nomatch) => {
        console.error('Got a deeplink that didn\'t match', nomatch);
    }
);