MCPcopy
hub / github.com/angular-ui/ui-router / TemplateFactoryProvider

Interface TemplateFactoryProvider

src/interface.ts:715–738  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

713 * Defaults to `$templateRequest` on Angular versions starting from 1.3, `$http` otherwise.
714 */
715export interface TemplateFactoryProvider {
716 /**
717 * Forces $templateFactory to use $http instead of $templateRequest.
718 *
719 * UI-Router uses `$templateRequest` by default on angular 1.3+.
720 * Use this method to choose to use `$http` instead.
721 *
722 * ---
723 *
724 * ## Security warning
725 *
726 * This might cause XSS, as $http doesn't enforce the regular security checks for
727 * templates that have been introduced in Angular 1.3.
728 *
729 * See the $sce documentation, section
730 * <a href="https://docs.angularjs.org/api/ng/service/$sce#impact-on-loading-templates">
731 * Impact on loading templates</a> for more details about this mechanism.
732 *
733 * *Note: forcing this to `false` on Angular 1.2.x will crash, because `$templateRequest` is not implemented.*
734 *
735 * @param useUnsafeHttpService `true` to use `$http` to fetch templates
736 */
737 useHttpService(useUnsafeHttpService: boolean);
738}
739
740declare module '@uirouter/core/lib/state/stateRegistry' {
741 interface StateRegistry {

Callers 1

Implementers 1

TemplateFactorysrc/templateFactory.ts

Calls

no outgoing calls

Tested by

no test coverage detected