Page 1 of 3

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

Posted: Tue Apr 07, 2015 2:45 am
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.


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

Posted: Tue Apr 07, 2015 12:20 pm
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?


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

Posted: Wed Apr 08, 2015 10:15 am
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.


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

Posted: Wed Apr 08, 2015 10:49 am
by Ravenight

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


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

Posted: Wed Apr 08, 2015 12:49 pm
by Illya Stepanov

Approximately early May.


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

Posted: Thu May 21, 2015 6:48 am
by Argia

Is this possible now with the Appery update?


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

Posted: Thu May 28, 2015 2:07 am
by Yurii Orishchuk

Hi Argia,

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

Regards.


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

Posted: Tue Jun 02, 2015 11:47 am
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...


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

Posted: Wed Jun 03, 2015 2:14 pm
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...


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

Posted: Sun Jun 07, 2015 1:20 pm
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] "