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

Woocommerce API Variable Subscription Product update
Alexa Skill - Keep Intent alive for dialogue
Post to google+ wall from plusDomains api
Nodemailer error connect ECONNREFUSED
Node.js not serving files other than index.html
do not run loop queue when specify argument in yeoman generator
cannot pass variables from node js to ejs page
Node.js: how to save uploaded file from browser form?
How to put flash message into my code?
Aggregate method not working as expected
Docker compose version 3 doesn't work as I expected
Ajax call in react js
How to setup an API server with no domain name
Possible collision between nodejs and angular routing
How to include dynamically generated data in module.exports
MongoError. the (immutable) field '_id' was found to have been altered to _id

Categories

HOME
videochat
gnuplot
google-analytics
inno-setup
encryption
properties
environment-variables
cakephp-3.0
animate.css
etcd
login
chromium
raspberry-pi3
apache-apex
purescript
google-cardboard
bayesian
zk
pthreads
wmi-query
executable-jar
codecvt
tablesorter
emu8086
postgresql-9.0
smt
konvajs
gun
xfce
powerpoint-vba
frama-c
angular-openlayers
week-number
jquery-ui-autocomplete
infowindow
bluehost
word
layer
crawler4j
hashcode
google-tv
apache-hive
war
powerdns
regedit
android-runonuithread
smartassembly
lift
960.gs
model-driven
media-type
sw-precache
background-position
grunt-string-replace
enterprise-library-6
o365rwsclient
angular-chart
xquery-sql
friend-function
tiles
gear-vr
fixed
bubble-sort
google-gadget
data-transfer
local-variables
vibration
review-board
pubsubhubbub
owner
giflib
kmip
android-selector
nsolid
classname
testdroid
mediafire
arrangeoverride
struts2-jquery-grid
r1soft
pagerslidingtabstrip
command-line-tool
tess-two
apache-commons
moovweb
smslib
qmediaplayer
google-client
date-arithmetic
zooming
stackato
xcode-instruments
out
offlineapps
nodejitsu
divshot
xadisk
jquery-mobile-collapsible
lytebox
addr2line
testdriven.net
juggernaut
entityreference
www-mechanize
showmodaldialog
whiteboard
nice

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile