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

How to get the Username from Twitter with oauth_verifier and oauth_token in Node.js?
two include into if not works on nunjucks
Amazon's AWS.NodeHttpClient - no documentation :(
Nginx fails to receive custom header when Redirected by Proxy server Node
access values after authentication in node js
How secure is websocket/socket.io?
Use commander in typescript
Does it makes any difference from module caching perspective how it is required?
What does “this” refers to in the code below?
Emergency! Error: This socket has been ended by the other party
angular4 server side rendering issue
NodeJS: Can't connect to postgreSQL container from another container
Node.js making an SSL connection to an FTPS server
Mongoose not retrieving the same data as mongo console client
eslint parsing error: Parsing error: Unexpected token =>
Mongo / Mongoose Aggregation - $redact and $cond issues

Categories

HOME
objective-c
loops
hardware
sharppcap
attributes
amazon-redshift
ibm-mobilefirst
animate.css
put
asp.net-web-api2
bluetooth-lowenergy
crc
uinavigationcontroller
spark-dataframe
alexa-voice-service
pyvmomi
azure-storage-blobs
polymer-1.0
nattable
apache-felix
react-apollo
bug-tracking
phylogeny
avaya
android-logcat
pgadmin
pi4j
jqassistant
python-tesseract
openfiledialog
bluehost
maven-exec-plugin
appery.io
lsmeans
spamassassin
azure-virtual-machine
web.py
each
redhat-bpm
meta-tags
keyword-search
html.dropdownlistfor
evosuite
tableau-public
mosync
api-manager
bandwidth
fluentbootstrap
android-datepicker
fuzzy
xml-rpc
playstation
leap-motion
type-systems
raptor
unicorn
plone-4.x
correspondence-analysis
testdroid
data-connections
xcode4
ibm-jazz
dfdl
cmfctoolbar
gridsplitter
steroids
zshrc
elmah.mvc
rich-snippets
maven-site-plugin
cleartool
build-system
curator
mysql-error-1093
javascript-databinding
triples
invalidation
bonjour
updatemodel
resharper-7.1
presentmodalviewcontrolle
facebook-app-center
boost-spirit-karma
jquery-ui-selectable
getprocaddress
python-sockets
continuations
single-user
xcode4.1
windows-live-writer
paint.net
isaserver
pia

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile