node.js


Sails.js get href for route with params


I'm makeing small Sails.js application. I have a very simple route like:
'/foo': 'FooController.index',
'/foo/:category': 'FooController.category',
My question is: how to make an url in server side rendered view to a category as a param.
I have something like:
<%= sails.getUrlFor('FooController.index') %>
for index, but I'd like to have something like
<%= sails.getUrlFor('FooController.index', {'category':'bar') %>
for a category.
Is there any function to do this like above? I don't want to hardcode the urls.
Thanks in advance and let the power be with you.

Related Links

socket.io determine if a user is online or offline
NodeJS get IPs from hostname
How do you define Mocha tests programmatically and asynchronously?
Mongoose Schema Array: CastError: Cast to undefined failed for value “[object Object]” at path
bind error with ldap authentication using Passport and node.js
How to detect the socket server authorization failure on client side in socket.io?
commenting async in globals.js doesn't affect its usage in services
Nodemailer without Gmail
How to determine if fs.createWriteSteam completes successfully?
multiCapabilities function throwing error in protractor
15 second delay on second request in node
Generate a secure token for api access
Config file for importing data from multiple couchdb databases Logstash
Node / Mocha test times out
Mongoose: how to insert a field/value into an existing subdocument
Creating a JSON file(MongoDb Collection) of User Info for a Node.js application that uses Bcrypt and passport for login

Categories

HOME
sitecore8
reverse-geocoding
asynchronous
firmware
rabbitmq
accounting
mono
g2o
unity5
wayland
geogebra
cordova-plugins
outlook-addin
glusterfs
widget
lokijs
rhel
angularjs-ng-transclude
logstash-grok
xamarin.mac
jquery-gmap3
biopython
skybot
rinsim
uidocumentinteraction
derivative
build-automation
polymer-1.0
couchbase-view
ajaxform
greedy
pki
xfce
http-caching
ply
postgresql-8.3
bing-api
jquery-ui-autocomplete
modeling
omnipay
fread
gearman
pam
angular-daterangepicker
dexguard
tridion
filestream
c#-6.0
automated-deployment
configuration-files
android-optionsmenu
ansible-vault
laravel-excel
cartography
yield
lsof
xquery-sql
gitversion
measurement-studio
terminal-emulator
ikvm
equation
miva
shodan
kubernetes-health-check
hasownproperty
simplehttpserver
leap-motion
visual-c++-2013
news-feed
post-commit
oslo
jcarousel
traffic-simulation
youtube-javascript-api
payara
yard
argo
fedora-commons
tess-two
zshrc
elmah.mvc
protractor-net
aloha-editor
glut
joptimizer
protection
elasticsearch-marvel
html5-validation
event-loop
treenode
dynamicquery
sqr
resharper-plugins
psychology
nsurlprotocol
groff
string-conversion
amazon-simpledb
zebra-puzzle
django-1.2
scite
hierarchyid
fold
circular-reference
tandem
remotipart
badimageformatexception
customvalidator
sts-securitytokenservice
xemacs
python-sockets
bionic
mono-service
soaplite
raw-ethernet
rakefile
zend-navigation
widechar
installshield-2008
moss2007enterprisesearch
xla

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App