You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to lazy load services which are dependent on other services.
For example
Service A has service B as a dependency and service B has service C as dependency.
In order to load A, services B and C must be loaded first.
I want to lazy load all services when needed. I want to do something like this.
app.config(["$ocLazyLoadProvider", function ($ocLazyLoadProvider) {
$ocLazyLoadProvider.config({
'modules': [{
name: 'serviceA'
files: ['serviceC.js','serviceB.js','serviceA.js'],
serie:true
},
{
name: 'serviceB'
files: ['serviceC.js','serviceB.js'],
serie:true
},
{
name: 'serviceC'
files: ['serviceC.js'],
serie:true
},
}]
})
Now problem I am facing is that I have to mention all indirect dependencies. Like service C in case of loading A.
Is there any way I can just invoke module serviceB in order to load serviceA and don't have to mention indirect dependencies like serviceC. like
name: 'serviceA'
files: ['serviceB','serviceA.js'], ---------where service B is module name.
serie:true
Is it possible to do module inheritance?
What else can be done to achieve this in config? Because I don't want to do this in resolve.
The text was updated successfully, but these errors were encountered:
I want to lazy load services which are dependent on other services.
For example
Service A has service B as a dependency and service B has service C as dependency.
In order to load A, services B and C must be loaded first.
I want to lazy load all services when needed. I want to do something like this.
app.config(["$ocLazyLoadProvider", function ($ocLazyLoadProvider) {
$ocLazyLoadProvider.config({
'modules': [{
name: 'serviceA'
files: ['serviceC.js','serviceB.js','serviceA.js'],
serie:true
},
{
name: 'serviceB'
files: ['serviceC.js','serviceB.js'],
serie:true
},
{
name: 'serviceC'
files: ['serviceC.js'],
serie:true
},
}]
})
Now problem I am facing is that I have to mention all indirect dependencies. Like service C in case of loading A.
Is there any way I can just invoke module serviceB in order to load serviceA and don't have to mention indirect dependencies like serviceC. like
Is it possible to do module inheritance?
What else can be done to achieve this in config? Because I don't want to do this in resolve.
The text was updated successfully, but these errors were encountered: