oclazyload

How can I inject an AngularJS module dependency without declaring it in the dependency array when the module is defined?

允我心安 提交于 2019-12-11 00:01:54
问题 Currently the only way that I know of to make module dependencies available is to specify them when a module is declared. e.g.: angular.module("myApp",["myDependentModule"]); This becomes a problem when the app gets large and modules have a lot of dependencies, libraries that must be loaded. If these libraries aren't required for any of the modules that the first page the user visits, it seems that those dependencies could be deferred to improve load time. Any advice would be appreciated. 回答1

Controller is loaded in DOM but the view not loaded and can't find controller- oclazyload with jade(pugjs)

跟風遠走 提交于 2019-12-08 17:17:21
问题 I am using angular 1.6 for my project and angular-ui-routing for routing with PugJs for HTML templates. I am trying to implement Lazyload in my application, but somehow its not working may be due to jade. code : var app = angular.module('myApp',['ui.router','oc.lazyLoad']); app.config(['$ocLazyLoadProvider', function($ocLazyLoadProvider { $ocLazyLoadProvider.config({ debug: true, modules: [{ name: 'js', files: ['js/*'] }] }); }]); .state("exampleState", { url: '/example', templateUrl: '

Lazy-load MonacoEditor

风流意气都作罢 提交于 2019-12-08 08:10:18
问题 I have the following code to load MonacoEditor in index.html of my AngularJS website: <link rel="stylesheet" data-name="vs/editor/editor.main" href="/monaco-editor/min/vs/editor/editor.main.css" /> <script src="/monaco-editor/min/vs/loader.js"></script> <script src="/monaco-editor/min/vs/editor/editor.main.nls.js"></script> <script src="/monaco-editor/min/vs/editor/editor.main.js"></script> <script> require.config({ paths: { 'vs': '/monaco-editor/min/vs' }}) console.log(monaco) </script>

Loading html and Controller from server and creating dynamic states UI - router

℡╲_俬逩灬. 提交于 2019-12-03 12:21:48
问题 I am looking for a Solution to load my App Content dynamically from the Server. My Scenario: Lets say we have 2 Users (A and B), my App consists of different Modules like lets say a shoppingList and a calculator, now my goal would be the User logs into my App from the Database I get the User rights and depending what rights he has, i would load the html for the views and the controller files for the logic part from the Server, while doing that I would create the states needed for the html and

Loading html and Controller from server and creating dynamic states UI - router

↘锁芯ラ 提交于 2019-12-03 01:52:06
I am looking for a Solution to load my App Content dynamically from the Server. My Scenario: Lets say we have 2 Users (A and B), my App consists of different Modules like lets say a shoppingList and a calculator, now my goal would be the User logs into my App from the Database I get the User rights and depending what rights he has, i would load the html for the views and the controller files for the logic part from the Server, while doing that I would create the states needed for the html and ctrl. So basically my App is very small consistent of the Login and everything else is getting pulled

AngularJS- Dynamic Loading of script files using LazyLoad- Webpack

杀马特。学长 韩版系。学妹 提交于 2019-11-27 16:00:30
Right now in my index.html page I have links to two CDN files one being a JS and the other a CSS file. i.e. in the the bottom of my body https://somedomain.com/files/js/js.min.js and in the head https://somedomain.com/files/css/css.min.css But right now they aren't needed on my homepage but just in one particular route. So I was looking into how I can lazy load these CDN resources when that routes gets hit i.e. /profile and only then ? These aren't installed via bower or npm but just loaded via CDN url for example jquery. How in Angular 1 and Webpack can I lazy load that based on a route ?

AngularJS- Dynamic Loading of script files using LazyLoad- Webpack

こ雲淡風輕ζ 提交于 2019-11-26 17:22:50
问题 Right now in my index.html page I have links to two CDN files one being a JS and the other a CSS file. i.e. in the the bottom of my body https://somedomain.com/files/js/js.min.js and in the head https://somedomain.com/files/css/css.min.css But right now they aren't needed on my homepage but just in one particular route. So I was looking into how I can lazy load these CDN resources when that routes gets hit i.e. /profile and only then ? These aren't installed via bower or npm but just loaded