{{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
joinBasehelper is used to create urls within your application for static resources, such as images. An example usage:Where
nameis a scope value, this might returnhttp://example.com/app/hello/world.pngif 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.baseURLstring is set, this will be used.System.baseURLis set, this will be used.location.pathname.