-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix issues with reload patchers #13
Labels
Comments
...this seems to work? or is there more magic somewhere that's not immediately obvious? let service = this,
patchers = [],
tabs = [];
this.resetTabs = function () {
tabs = [{
label: 'Build Patches',
templateUrl: `${moduleUrl}/partials/buildPatches.html`,
controller: 'buildPatchesController'
}]
}
this.resetTabs(); and: $rootScope.$on('reloadPatchers', () => {
tabs.forEach(tab => {
if (!tab.templateUrl) return;
$cacheFactory.get('templates').remove(tab.templateUrl);
});
service.resetTabs();
service.reloadPatchers();
service.loadSettings();
}); |
To support the case where this.reloadPatchers = function() {
let patcherPaths = patchers.map(patcher => patcher.info.path);
patchers = [];
patcherPaths.forEach(moduleService.loadModule);
}; and to save the path: let upfLoader = function({module, fh, moduleService}) {
+ // save the path for if we need to reload later.
+ module.info.path = module.path;
Function.execute({
registerPatcher: patcherService.registerPatcher, Although, perhaps it should be more like: patcherService.getPatcher(module.info.id).path = module.path; and: let patcherPaths = patchers.map(patcher => patcher.path); |
that looks good, willing to submit a PR for it? |
Done. Please see #25 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need to be able to reload controllers/settings tabs, among other things.
The text was updated successfully, but these errors were encountered: