-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resovle request, which was failed. #189
Comments
hu that's really not what is supposed to happen. I wonder if it's because the browser caches the error and returns it everytime after that ? |
No, Browser don`t cache. I tested on several browsers, - Chrome with cache disabled, Firefox.. maby caching requests, Opera with cache disabled, MS IE not tested. I created custom function thet call $http.get request with same file, and it resolved normaly. |
Ok, I'll check it out then, it's probably some internal caching inside the lib then :) |
I can`t simulate this on plunkr because for investigate the problem we need to manage network or server for become unreachable... but... Some code: angular
.module('app', ['ui.router','oc.lazyLoad']);
angular.module('app')
.config(
[ '$stateProvider', '$urlRouterProvider',
function ( $stateProvider, $urlRouterProvider ) {
$stateProvider
.state('sign', {
templateUrl: 'components/login/views/login.main.html',
}
})
.state('sign.forgotPassword', {
url: '^/forgot-password',
templateUrl: 'part.forgot-password.html',
resolve: {
deps: ['$ocLazyLoad',
function( $ocLazyLoad ){
return
$ocLazyLoad.load(['components/login/scripts/forgotPasswordCtrl.js']);
/* This is where a bug */
}]
}
}); HTML (login.main.html): <a ui-sref="sign.forgotPassword">Test</a> |
Thanks, that should do it |
Fixed! |
I also met the same problem, have to solve |
If occurred some error in resolve request, for example - server is unrechable, ocLazyLoad return deferred.reject;
But in future, even if server is reachable, if some module rerequest same dependencies, it will immidiately returned as rejected.
reject come from ocLazyLoad.js:803:37
@Version v1.0.0-beta.2
This is a Bug or a Hint? And how I can redefine this beahiour - if the request failed,with the second same request was an attempt to resolve it.
The text was updated successfully, but these errors were encountered: