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]> 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]. > 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. > -- *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.
