ngx-router
Version:
A utility to get route params, query params from Activated Route by using dependency injection
20 lines (15 loc) • 869 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-data', ['exports', 'rxjs/operators'], factory) :
(global = global || self, factory((global['ngx-router'] = global['ngx-router'] || {}, global['ngx-router']['route-data'] = {}), global.rxjs.operators));
}(this, (function (exports, operators) { 'use strict';
function routeDataFactory(paramKey) {
return function (_a) {
var data = _a.data;
return data.pipe(operators.map(function (data) { return data[paramKey]; }));
};
}
exports.routeDataFactory = routeDataFactory;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=ngx-router-route-data.umd.js.map