How do you load a module ( e.g. angular-local-storage) in the new AngularJS platform?

This forum contains topics that were moved from Get Satisfaction
Ravenight
Posts: 0
Joined: Sun Jan 11, 2015 3:43 pm

How do you load a module ( e.g. angular-local-storage) in the new AngularJS platform?

Post by Ravenight »

I would like to use the angular module - angular-local-storage (found here: https://github.com/grevory/angular-lo... ) within the new platform.

However, I cannot find the .config file to require (so I can add this as a shim) or the app definition where I can drop in 'LocalStorageModule' into the dependencies.

Any guidance on this would be quite helpful.
Thanks in advance.

Ravenight
Posts: 0
Joined: Sun Jan 11, 2015 3:43 pm

How do you load a module ( e.g. angular-local-storage) in the new AngularJS platform?

Post by Ravenight »

I have found where require.config is located under the "source" tab. However, if I add anything to the app.js file I destroy the link to the visual editor.

Is there a way to inject this module where I won't break the visual editor in the process?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

How do you load a module ( e.g. angular-local-storage) in the new AngularJS platform?

Post by Illya Stepanov »

Hello -

Unfortunately, now at this moment there is no possibility to add modules into AngularJS project. We are working on this feature in future release.

Ravenight
Posts: 0
Joined: Sun Jan 11, 2015 3:43 pm

How do you load a module ( e.g. angular-local-storage) in the new AngularJS platform?

Post by Ravenight »

Okay. This is most definitely a feature worth implementing. Any chance there is a rough time table for this one?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

How do you load a module ( e.g. angular-local-storage) in the new AngularJS platform?

Post by Illya Stepanov »

Approximately early May.

Argia
Posts: 0
Joined: Thu May 21, 2015 6:48 am

How do you load a module ( e.g. angular-local-storage) in the new AngularJS platform?

Post by Argia »

Is this possible now with the Appery update?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How do you load a module ( e.g. angular-local-storage) in the new AngularJS platform?

Post by Yurii Orishchuk »

Hi Argia,

Please check this tutorial: https://devcenter.appery.io/documenta...

Regards.

Ravenight
Posts: 0
Joined: Sun Jan 11, 2015 3:43 pm

How do you load a module ( e.g. angular-local-storage) in the new AngularJS platform?

Post by Ravenight »

I am trying to add a module following the instructions but I am getting an error.

just to be sure it wasn't my app:
I created a fresh app and immediately followed the instructions from the tutorial here: https://devcenter.appery.io/documenta...

When I test the app I get the following in the console and the app never runs:
http://errors.angularjs.org/1.3.15/$i...

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

How do you load a module ( e.g. angular-local-storage) in the new AngularJS platform?

Post by Illya Stepanov »

Hi -

Yes, you can add module through Dependency Manager and define it there as Angular module.

After that you can you use it as injector as following construction:

pre
codeApperyio.get('Name_of_a_service')/code
/pre

Here is more info about Dependency Manager: https://devcenter.appery.io/documenta...

Ravenight
Posts: 0
Joined: Sun Jan 11, 2015 3:43 pm

How do you load a module ( e.g. angular-local-storage) in the new AngularJS platform?

Post by Ravenight »

This still isn't working for me. I have tried completely fresh apps - both Ionic and Bootstrap - and both throw errors when following the Dependency Manager instructions.

Ionic throws:
" WARNING: Tried to load angular more than once. ionic.bundle.js:34397"
" Uncaught Error: [$injector:modulerr] "

Bootstrap Throws:
" Uncaught Error: [$injector:modulerr] "

Post Reply