Richard,

*angularAMD* is a wrapper around mechanism described in the ify article but
uses RequireJS instead of $script.js to perform the actual loading.  Take a
look at this Gist <http://bl.ocks.org/marcoslin/df4b741e92b2829eeae8> and
compare it to the post and you should see that complexity of caching of
providers and loading of controller is abstracted away.  A unique feature
of angularAMD is to perform on-demand loading of existing module via a
RequireJS plugin called *ngload*.  In the angularAMD
<http://marcoslin.github.io/angularAMD/> sample website, the Picture tab
loads ui-bootstrap <http://angular-ui.github.io/bootstrap/> package only
when that tab is selected.

As an open source package, users raises issues and bugs that make it a more
stable implementation.  Take a look at the latest release note with
different bugs that was raised and fixed:

https://github.com/marcoslin/angularAMD/blob/master/CHANGELOG.md#011-2014-05-28

Finally, there is also sample code in the repo that show you how you can
perform unit and e2e testing for a RequireJS module coded for AngularJS.

Having said that, this is not a framework for people just staring with
AngularJS as you would also need to understand how RequireJS works in order
to get everything up and running correctly.

Hope this helps,

Marcos



On Fri, May 30, 2014 at 5:50 AM, RichardAlan <[email protected]>
wrote:

> Thanks for the link. I did see your code before but what I would really
> like to understand is the advantages that it gives. Hopefully written in a
> way that I as a (not so expert) javascript guy can understand. I have also
> checked this link out: http://ify.io/lazy-loading-in-angularjs/  Can you
> explain to me what angularAMD offers that can't be done with using some
> code like in the link from ify.
>
> Thanks very much
>
> On Thursday, 29 May 2014 16:22:27 UTC+9, Marcos Lin wrote:
>>
>> I had a similar need so I created an open source package called
>> angularAMD that make it slightly easier to do lazy loading with AngularJS.
>>  Here is the demo website with link to github repo:
>>
>> http://marcoslin.github.io/angularAMD/
>>
>> Hope this helps.
>>
>> On Tuesday, 27 May 2014 03:14:47 UTC+2, RichardAlan wrote:
>>>
>>> I have a SPA application.  When the index.html loads I load AngularJS
>>> and all of the javascript my application users will use.  This means that
>>> even the basic users also get the javascript for admin users loaded to
>>> their PCs. What I would like to do is to load some modules at a later time
>>> after I have determined if the user is authorized as a basic, editing or
>>> admin user.
>>>
>>> From what I understand lazy loading is something that is planned for a
>>> future release of AngularJS.
>>>
>>> Can anyone give me an update on the status of this. Has anyone been
>>> suggesting if the lazy loading will be based on an exisiting framework ?
>>>  Also any suggestions on how I could best do lazy loading until AngularJS
>>> comes up with a solution?
>>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "AngularJS" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/kJEgckFT19Y/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>

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

Reply via email to