mercredi 2 septembre 2015

angularJs and ocLazyLoader

I'm pretty new with angularJs. Currently I'm developing a one-page website with laravel framework.

Currently I have only one ngView, where i put my home page codes, but the issues is that all components like sliders, gallery is not working when i put them in a view file. After some searches I found out a module called ocLazyLoad. Modules are loading but sometimes other scripts are loading before jQuery and website again doesn't display the components.

Is there any way to force Loader or Angular to load scripts first and then display view ?

.run(function($rootScope, $state, $ocLazyLoad) {



            $ocLazyLoad.load({

                name: 'authApp',

                files: ['style/js/jquery.min.js', 
                'style/js/bootstrap.min.js',
                'style/js/googlemap.js',
                'style/js/twitter-bootstrap-hover-dropdown.min.js',
                'style/js/jquery.themepunch.plugins.min.js',
                'style/js/jquery.themepunch.revolution.min.js',
                'style/js/jquery.easytabs.min.js',
                'style/js/owl.carousel.min.js',
                'style/js/jquery.isotope.min.js',
                'style/js/jquery.fitvids.js',
                'style/js/jquery.fancybox.pack.js',
                'style/js/fancybox/helpers/jquery.fancybox-thumbs.js?v=1.0.2',
                'style/js/fancybox/helpers/jquery.fancybox-media.js?v=1.0.0',
                'style/js/jquery.slickforms.js',
                'style/js/instafeed.min.js',
                'style/js/retina.js',
                'style/js/google-code-prettify/prettify.js',
                'style/js/scripts.js']

            });

I'm loading everything in module.run() function.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1JCHX9s
via IFTTT

Aucun commentaire:

Enregistrer un commentaire