$templateFactory
ui.router.util
Service. Manages loading of templates.
Creates a template from a configuration object.
Param | Type | Details |
---|---|---|
config | object | Configuration object for which to load a template. The following properties are search in the specified order, and the first one that is defined is used to create the template: |
config.template | stringobject | html string template or function to load via fromString. |
config.templateUrl | stringobject | url to load or a function returning the url to load via fromUrl. |
config.templateProvider | Function | function to invoke via fromProvider. |
params | object | Parameters to pass to the template function. |
locals | object | Locals to pass to |
string|object | The template html as a string, or a promise for
that string,or |
Creates a template by invoking an injectable provider function.
Param | Type | Details |
---|---|---|
provider | Function | Function to invoke via |
params | Object | Parameters for the template. |
locals | Object | Locals to pass to |
string|Promise.<string> | The template html as a string, or a promise for that string. |
Creates a template from a string or a function returning a string.
Param | Type | Details |
---|---|---|
template | stringobject | html template as a string or function that returns an html template as a string. |
params | object | Parameters to pass to the template function. |
string|object | The template html as a string, or a promise for that string. |
Loads a template from the a URL via $http
and $templateCache
.
Param | Type | Details |
---|---|---|
url | stringFunction | url of the template to load, or a function that returns a url. |
params | Object | Parameters to pass to the url function. |
string|Promise.<string> | The template html as a string, or a promise for that string. |