* @ngdoc provider * @name $locationProvider * @description * Use the `$locationProvider` to configure how the application deep linking paths are stored.
()
| 9825 | * Use the `$locationProvider` to configure how the application deep linking paths are stored. |
| 9826 | */ |
| 9827 | function $LocationProvider(){ |
| 9828 | var hashPrefix = '', |
| 9829 | html5Mode = false; |
| 9830 | |
| 9831 | /** |
| 9832 | * @ngdoc method |
| 9833 | * @name $locationProvider#hashPrefix |
| 9834 | * @description |
| 9835 | * @param {string=} prefix Prefix for hash part (containing path and search) |
| 9836 | * @returns {*} current value if used as getter or itself (chaining) if used as setter |
| 9837 | */ |
| 9838 | this.hashPrefix = function(prefix) { |
| 9839 | if (isDefined(prefix)) { |
| 9840 | hashPrefix = prefix; |
| 9841 | return this; |
| 9842 | } else { |
| 9843 | return hashPrefix; |
| 9844 | } |
| 9845 | }; |
| 9846 | |
| 9847 | /** |
| 9848 | * @ngdoc method |
| 9849 | * @name $locationProvider#html5Mode |
| 9850 | * @description |
| 9851 | * @param {boolean=} mode Use HTML5 strategy if available. |
| 9852 | * @returns {*} current value if used as getter or itself (chaining) if used as setter |
| 9853 | */ |
| 9854 | this.html5Mode = function(mode) { |
| 9855 | if (isDefined(mode)) { |
| 9856 | html5Mode = mode; |
| 9857 | return this; |
| 9858 | } else { |
| 9859 | return html5Mode; |
| 9860 | } |
| 9861 | }; |
| 9862 | |
| 9863 | /** |
| 9864 | * @ngdoc event |
| 9865 | * @name $location#$locationChangeStart |
| 9866 | * @eventType broadcast on root scope |
| 9867 | * @description |
| 9868 | * Broadcasted before a URL will change. This change can be prevented by calling |
| 9869 | * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more |
| 9870 | * details about event object. Upon successful change |
| 9871 | * {@link ng.$location#events_$locationChangeSuccess $locationChangeSuccess} is fired. |
| 9872 | * |
| 9873 | * @param {Object} angularEvent Synthetic event object. |
| 9874 | * @param {string} newUrl New URL |
| 9875 | * @param {string=} oldUrl URL that was before it was changed. |
| 9876 | */ |
| 9877 | |
| 9878 | /** |
| 9879 | * @ngdoc event |
| 9880 | * @name $location#$locationChangeSuccess |
| 9881 | * @eventType broadcast on root scope |
| 9882 | * @description |
| 9883 | * Broadcasted after a URL was changed. |
| 9884 | * |
nothing calls this directly
no test coverage detected