Skip to content

Commit 45d579f

Browse files
committed
added add path function
1 parent 6338031 commit 45d579f

File tree

6 files changed

+23
-3
lines changed

6 files changed

+23
-3
lines changed

.versions

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ jquery@1.11.3_2
1919
json@1.0.3
2020
launch-screen@1.0.2
2121
livedata@1.0.13
22-
local-test:nicolaslopezj:router-layer@0.0.6
22+
local-test:nicolaslopezj:router-layer@0.0.7
2323
logging@1.0.7
2424
meteor@1.1.6
2525
meteor-platform@1.2.2
2626
minifiers@1.1.5
2727
minimongo@1.0.8
2828
mobile-status-bar@1.0.3
2929
mongo@1.1.0
30-
nicolaslopezj:router-layer@0.0.6
30+
nicolaslopezj:router-layer@0.0.7
3131
observe-sequence@1.0.6
3232
ordered-dict@1.0.3
3333
random@1.0.3

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,7 @@ Returns a parameter of the url
101101
**Parameters**
102102

103103
**queryStringKey**: `String`, The name of the parameter
104+
105+
#### RouterLayer.getPath()
106+
107+
Returns the path of the current route

flow-router.js

+4
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,8 @@ if (RouterLayer.router == 'flow-router') {
7373
RouterLayer._getQueryParam = function(queryStringKey) {
7474
return this.flowRouter.getQueryParam(queryStringKey);
7575
}
76+
77+
RouterLayer._getPath = function() {
78+
return this.flowRouter.current().path;
79+
}
7680
}

iron-router.js

+4
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,8 @@ if (RouterLayer.router == 'iron-router') {
6060
RouterLayer._getQueryParam = function(queryStringKey) {
6161
return this.ironRouter.current().params.query[queryStringKey];
6262
}
63+
64+
RouterLayer._getPath = function() {
65+
return this.ironRouter.current().route.path()
66+
}
6367
}

layer.js

+8
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,11 @@ RouterLayer.getQueryParam = function(queryStringKey) {
125125

126126
return this._getQueryParam(queryStringKey);
127127
}
128+
129+
/**
130+
* Returns the path of the current route
131+
* @return {String} The path of the current route
132+
*/
133+
RouterLayer.getPath = function() {
134+
return this._getPath();
135+
}

package.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package.describe({
22
name: 'nicolaslopezj:router-layer',
33
summary: 'A layer for Meteor Routers',
4-
version: '0.0.6',
4+
version: '0.0.7',
55
git: 'https://github.com/nicolaslopezj/meteor-router-layer'
66
});
77

0 commit comments

Comments
 (0)