MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / $QProvider

Function $QProvider

lib/test/angular/1.8.0/angular.js:17881–17910  ·  view source on GitHub ↗

* @ngdoc provider * @name $qProvider * @this * * @description

()

Source from the content-addressed store, hash-verified

17879 * @description
17880 */
17881function $QProvider() {
17882 var errorOnUnhandledRejections = true;
17883 this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {
17884 return qFactory(function(callback) {
17885 $rootScope.$evalAsync(callback);
17886 }, $exceptionHandler, errorOnUnhandledRejections);
17887 }];
17888
17889 /**
17890 * @ngdoc method
17891 * @name $qProvider#errorOnUnhandledRejections
17892 * @kind function
17893 *
17894 * @description
17895 * Retrieves or overrides whether to generate an error when a rejected promise is not handled.
17896 * This feature is enabled by default.
17897 *
17898 * @param {boolean=} value Whether to generate an error when a rejected promise is not handled.
17899 * @returns {boolean|ng.$qProvider} Current value when called without a new value or self for
17900 * chaining otherwise.
17901 */
17902 this.errorOnUnhandledRejections = function(value) {
17903 if (isDefined(value)) {
17904 errorOnUnhandledRejections = value;
17905 return this;
17906 } else {
17907 return errorOnUnhandledRejections;
17908 }
17909 };
17910}
17911
17912/** @this */
17913function $$QProvider() {

Callers

nothing calls this directly

Calls 2

qFactoryFunction · 0.70
isDefinedFunction · 0.70

Tested by

no test coverage detected