{{joinBase args}}
can.stache.helpers.joinBase
{{joinBase expr}}
Return an application-relative url for a resource.
Parameters
-
expr
{can.stache.expression}
Optional VariableAn expression or key that references a value within the current or parent scope.
Returns
{String}
An application-relative url.
The
joinBase
helper is used to create urls within your application for static resources, such as images. An example usage:Where
name
is a scope value, this might returnhttp://example.com/app/hello/world.png
if the application ishttp://example.com/app
.The url to join with is determined by the following factors:
{{joinBase "../foo.png"}}
and using StealJS the template's address will be used as a reference to look up the location.can.baseURL
string is set, this will be used.System.baseURL
is set, this will be used.location.pathname
.