$mfwiLinksProvider
mfw-ionic.deep-links
Provider of $mfwiLinks
service.
Declare a new route by setting the relative URI and an associated callback.
Callbacks can be:
$match
where you'll receive the
matched route.Example
$mfwiLinksProvider // Route with data .addRoute({ '/help': { callback: 'app.help', uiRouterParent: 'app.home' } }) // Injectable callback .addRoute('/route/:param', ['$log', '$match', function ($log, $match) { $log.log('Matched route:', $match); }]) // Route .addRoute('/settings', 'app.settings');
Param | Type | Details |
---|---|---|
routeDefOrUrl | stringobject | Deep link route definition:
|
stateNameOrCallback | stringFunctionArray.<String|function()> | Match callback:
|
object | Provider instance for nested calls. |
Configure linking options.
Example
$mfwiLinksProvider.config({ routesPrefix: '/app', matchCallback: successCallback, nomatchCallback: failCallback, nestedStatesDelay: 100, transitionHandler: customTransitionHandler }); // Registering any route will have a '/app' prefix $mfwiLinksProvider.addRoute('/path', callback); // It's actually registered as `/app/path` // When a match is found, both `successCallback` and `callback` will be executed.
Param | Type | Details | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | Options
|
object | Provider instance for nested calls. |