{"id":15499737,"url":"https://github.com/nicolaslopezj/meteor-router-layer","last_synced_at":"2025-04-22T22:04:08.689Z","repository":{"id":36185195,"uuid":"40489368","full_name":"nicolaslopezj/meteor-router-layer","owner":"nicolaslopezj","description":"A layer for Meteor Routers","archived":false,"fork":false,"pushed_at":"2017-08-09T04:37:27.000Z","size":19,"stargazers_count":49,"open_issues_count":2,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-17T13:32:06.069Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicolaslopezj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-10T15:12:14.000Z","updated_at":"2024-04-24T12:09:55.000Z","dependencies_parsed_at":"2022-08-18T06:29:54.435Z","dependency_job_id":null,"html_url":"https://github.com/nicolaslopezj/meteor-router-layer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolaslopezj%2Fmeteor-router-layer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolaslopezj%2Fmeteor-router-layer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolaslopezj%2Fmeteor-router-layer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolaslopezj%2Fmeteor-router-layer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicolaslopezj","download_url":"https://codeload.github.com/nicolaslopezj/meteor-router-layer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250331804,"owners_count":21413100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T08:55:00.826Z","updated_at":"2025-04-22T22:04:08.610Z","avatar_url":"https://github.com/nicolaslopezj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meteor Router Layer\n\n```\nnicolaslopezj:router-layer\n```\n\nThis project helps package authors to support multiple routers.\n\nThe layer supports:\n\n- [Iron Router](https://github.com/iron-meteor/iron-router)\n\nRequires: ```iron:router```\n\n- [Flow Router](https://github.com/kadirahq/flow-router)\n\nRequires: ```kadira:flow-router``` ```kadira:blaze-layout```\n\nFor flow router it allows you to use ```{{# Layout }}``` like\n[iron:layout](https://github.com/iron-meteor/iron-layout)\nwithout using it as a dependency (only for plain ```{{\u003e yield }}```).\n\n## Api\n\n#### RouterLayer.route(url, options)\n\nCreates a new route\n\n**Parameters**\n\n**url**: `String`, The path of the route\n\n**options**\n\n**options.template**: `String`, The template for this route\n\n**options.layout**: `String`, Optional. The layout for this route\n\n**options.name**: `String`, Optional. The name of the route\n\n\n\n#### RouterLayer.pathFor(routeName, params)\n\nReturns the path for a route\n\n**Parameters**\n\n**routeName**: `String`, The name of the route\n\n**params**: `Object`, Parameters for the route\n\n**Returns**: `String`, The requested url\n\n\n#### RouterLayer.isActiveRoute(routeName, params)\n\nCheck if the current route has the specified name and params (if set)\n\n**Parameters**\n\n**routeName**: `String`, The name of the route\n\n**params**: `Object`, Optional. The parameters of the route\n\n**Returns**: `Boolean`, True if the route is active\n\n\n#### RouterLayer.isActiveRoutePartial(routeName)\n\nCheck if the current route name, divided by dots, starts with the specified name\n\n**Parameters**\n\n**routeName**: `String`, The name of the route\n\n**Returns**: `Boolean`, True if the route is active\n\n#### RouterLayer.go(routeName, params)\n\nRedirects the user to the specified route\n\n**Parameters**\n\n**routeName**: `String`, The name of the route\n\n**params**: `Object`, Optional. The parameters of the route\n\n#### RouterLayer.getParam(paramName)\n\nReturns a parameter of the url\n\n**Parameters**\n\n**paramName**: `String`, The name of the parameter\n\n#### RouterLayer.getQueryParam(queryStringKey)\n\nReturns a parameter of the url\n\n**Parameters**\n\n**queryStringKey**: `String`, The name of the parameter\n\n#### RouterLayer.getPath()\n\nReturns the path of the current route\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolaslopezj%2Fmeteor-router-layer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicolaslopezj%2Fmeteor-router-layer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolaslopezj%2Fmeteor-router-layer/lists"}