blockBrowserNavigation
I am using angucomplete-alt in which when I enter a keyword for search I make http request . So, I am showing blockUI loader till I get response. But during loading if I press backspace or delete I am getting navigated back to previous page. For this, I used blockBrowserNavigation= true but it seems to be not working for me.
requestFilter
Allows you to specify a filter function to exclude certain ajax requests from blocking the user interface. The function is passed the Angular request config object. The blockU service will ignore requests when the function returns false.
// Tell the blockUI service to ignore certain requests
blockUIConfig.requestFilter = function(config) {
// If the request starts with '/api/quote' ...
if(config.url.match(/^\/api\/quote($|\/).*/)) {
return false; // ... don't block it.
}
};
requestFilter
Allows you to specify a filter function to exclude certain ajax requests from blocking the user interface. The function is passed the Angular request config object. The
blockUservice will ignore requests when the function returnsfalse.// Tell the blockUI service to ignore certain requests blockUIConfig.requestFilter = function(config) { // If the request starts with '/api/quote' ... if(config.url.match(/^\/api\/quote($|\/).*/)) { return false; // ... don't block it. } };
Perfect. I was also using angucomplete-alt and at the same time using block-ui module. When ever angucomplete-alt sends an AJAX request it has been cancelled immediately. After using requestFilter to ignore the autocomplete AJAX request everything worked.