TemplateFactoryProvider | @uirouter/angularjs
Options
Menu

Interface TemplateFactoryProvider

Manages which template-loading mechanism to use.

Defaults to $templateRequest on Angular versions starting from 1.3, $http otherwise.

Hierarchy

  • TemplateFactoryProvider

Implemented by

Index

Methods

Methods

  • useHttpService(useUnsafeHttpService: boolean): any
  • Forces $templateFactory to use $http instead of $templateRequest.

  • Forces $templateFactory to use $http instead of $templateRequest.

    UI-Router uses $templateRequest by default on angular 1.3+. Use this method to choose to use $http instead.


    Security warning

    This might cause XSS, as $http doesn't enforce the regular security checks for templates that have been introduced in Angular 1.3.

    See the $sce documentation, section Impact on loading templates for more details about this mechanism.

    Note: forcing this to false on Angular 1.2.x will crash, because $templateRequest is not implemented.

    Parameters

    • useUnsafeHttpService boolean
      :

      true to use $http to fetch templates

    Returns any


Generated using TypeDoc