| 713 | * Defaults to `$templateRequest` on Angular versions starting from 1.3, `$http` otherwise. |
| 714 | */ |
| 715 | export 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 | |
| 740 | declare module '@uirouter/core/lib/state/stateRegistry' { |
| 741 | interface StateRegistry { |
no outgoing calls
no test coverage detected