ngx-router
Version:
A utility to get route params, query params from Activated Route by using dependency injection
19 lines (14 loc) • 862 B
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs/operators')) :
typeof define === 'function' && define.amd ? define('ngx-router/route-param', ['exports', 'rxjs/operators'], factory) :
(global = global || self, factory((global['ngx-router'] = global['ngx-router'] || {}, global['ngx-router']['route-param'] = {}), global.rxjs.operators));
}(this, (function (exports, operators) { 'use strict';
function routeParamFactory(paramKey) {
return function (route) {
return route.paramMap.pipe(operators.map(function (param) { return param.get(paramKey); }));
};
}
exports.routeParamFactory = routeParamFactory;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=ngx-router-route-param.umd.js.map