UNPKG

ngx-router

Version:

A utility to get route params, query params from Activated Route by using dependency injection

19 lines (14 loc) 873 B
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs/operators')) : typeof define === 'function' && define.amd ? define('ngx-router/query-param', ['exports', 'rxjs/operators'], factory) : (global = global || self, factory((global['ngx-router'] = global['ngx-router'] || {}, global['ngx-router']['query-param'] = {}), global.rxjs.operators)); }(this, (function (exports, operators) { 'use strict'; function queryParamFactory(paramKey) { return function (route) { return route.queryParamMap.pipe(operators.map(function (queryMap) { return queryMap.get(paramKey); })); }; } exports.queryParamFactory = queryParamFactory; Object.defineProperty(exports, '__esModule', { value: true }); }))); //# sourceMappingURL=ngx-router-query-param.umd.js.map