can-href
can.view.href
Deprecated 2.3
Use the routeUrl helper instead like:
href="{{routeUrl prop=value}}"
.
Sets an element's href attribute so that its url will set the specified attribute values on can.route.
Use the routeUrl helper instead like:
href="{{routeUrl prop=value}}"
.
Sets an element's href attribute so that its url will set the specified attribute values on can.route.
Use
With no pretty routing rules, the following:
produces:
If pretty route is defined like:
The previous use of
can-href
will instead produce:You can use values from stache's scope like:
If
recipeId
was 6:If
recipeId
is observable and changes to 7: