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

Detect connection is encrypted (or not)
angular 2 changing my service in order to take my rest api from my backend
Alternative to waiting for child_process to quit node.js
How to get zone serial of a specific name server with node.js?
Getting `webPackDevMiddleware` to live-reload my browser [duplicate]
I've install the node_modules. Why is there still “no such file or directory”?
eslint doesn't pull in extends rules properly
Selectively apply middleware in express
Create private React library
Sub-routes in Main route not getting static files ExpressJS
Response time from nodejs server with express on raspberry pi extremely slow
cannot find webspace with name thff-rg-SouthCentralUSwebspace
Empty shared node object after updating across application
Using 2 middleware functions in one post
configure NodeJS process on two different machine
loopback query with near and order filter not working

Categories

HOME
.htaccess
lucene
ruby-on-rails-4
data-warehouse
junit
dependent-type
maven-lifecycle
uiviewcontroller
asp.net-web-api2
inform7
pstricks
spring-transactions
bpm
ninja
video.js
hudson
rinsim
4d-database
image-comparison
unimrcp
http-caching
size-classes
measurement
wijmo5
spring-4
lsmeans
sharethis
yamldotnet
netbanx-api
gunicorn
dos
filestream
scada
automated-deployment
fluent-nhibernate
auto-value
yield
getelementsbyclassname
winlims
evosuite
xquery-sql
tivoli-identity-manager
mypy
object-oriented-analysis
django-compressor
wso2dss
orders
lab-color-space
snobol
kubernetes-health-check
optional
r.js
synopsys-vcs
scodec
rpy2
volume-rendering
powershell-tools
svg-edit
news-feed
spock-reports
archiving
numerical-analysis
anthill
snap-lang
unreal-blueprint
oslo
f#-interactive
rgraph
swift-mt
dynamics-nav-2009
webots
build-dependencies
mod-jk
window-position
nstablecolumn
topological-sort
grunt-contrib-cssmin
zooming
image-manipulation
sequel
chap-links-library
fad
teamsite
restkit-0.20
restriction
apache-commons-exec
impactjs
intel-galileo
pyro
android-x86
kendo-validator
styledtext
contactscontract
sencha-touch-2.2
hierarchyid
mib
ldapconnection
java-service-wrapper
pmp
capability
lytebox
strtotime
icefaces-1.8
primefaces-extensions
scalaquery
sqa
webarchive
mindmapping
juggernaut
bootclasspath
django-generic-views
equivalent
mahjong
stack-unwinding
whiteboard
trackback
zero-pad

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