No. I was looking for a module loader spec. like Java's OSGI which isn't
available.
The closest seems to be https://github.com/ocombe/ocLazyLoad
I also see this.
$('#somebutton').on('click', function() {
require(
['every', 'javascript', 'dependency', 'for', 'other', 'screen'],
function(ev, js, dep, fr, othr, scrn){
// Create the screen with your dependencies
}
);
});
We don't want to do this when a button is clicked. I am also unsure how
this works. Any sample ?
Mohan
On Wednesday, 25 March 2015 19:16:36 UTC+5:30, Rishi Tandon wrote:
>
> Is there any harm on using the resolve() method?
> That is the exact purpose for the same.
>
> On Wed, Mar 25, 2015 at 3:44 AM, Mohan Radhakrishnan <
> [email protected] <javascript:>> wrote:
>
>> Hi,
>>
>> I have collected many discussion threads about this.
>>
>> One of the approaches is about the ui-router state resolve methods that
>> can load controllers dynamically
>>
>>
>> This is our problem.
>> I reference these loaders in my app.js. We have many such module loaders
>> and all the code is loaded in the browser when we view the first page.
>> This is recusively using require to load everything.
>>
>> Is there a way to wait till a particular module's screen is requested
>> before loading the related code. This does not seem to be possible without
>> adding code to do this like the ui-router resolve method.
>>
>> '../appmodule/moduleLoader',
>>
>> '../appmodule1/moduleLoader',
>>
>>
>> , function(angular) {
>> 'use strict';
>> return angular.module('mymodule', [
>> 'app.appmodule',
>> 'app.appmodule1', ]);
>>
>>
>> Thanks,
>>
>> Mohan
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "AngularJS" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> *Rishi Tandon*
> Pearson Learning Technology Group
>
> Mobile: (310) 926-9032
>
> Pearson
> Always Learning
> Learn more at www.pearson.com
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.