Browse files

Fix README.md again

  • Loading branch information...
1 parent 3d03f4a commit e4772f7f5950f30b2ae1aa6d11cafebdad6a0390 @maritz maritz committed Nov 30, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 README.md
View
5 README.md
@@ -62,8 +62,9 @@ You can use regular expressions as well. This leads myapp.com/register to your U
If you want to use arguments with custom routes, you can do that as well:
Ni.addRoute(/^\/details\/([\d]+)/i, '/User/details/$1');
-You can also define functions to test the path. This example will add the first and second path variables.
-Calling myapp.com/1/2 will internally redirect to use the "Number" controller and call the "positive" function, while calling myapp.com/add/1/-2 will call the "negative" function.
+You can also define functions to test the path. For example:
+Calling myapp.com/add/1/2 will internally redirect to use the "Number" controller and call the "positive" function, while calling
+myapp.com/add/1/-2 will call the "negative" function.
Ni.addRoute(function(path) {
var args = path.split('/'),
firstNum = parseInt(args[2]),

0 comments on commit e4772f7

Please sign in to comment.