How to lazy load file synchronously?
Posted in General by Ha Hoang Mon Dec 05 2016 06:36:27 GMT+0000 (Coordinated Universal Time)·2·Viewed 3,038 times
I have load several files with ocLazyLoad and it logs out that the second load before the first one and it cannot find the defined module.
here are my lazy load code
```javascript
resolve: {
deps: ['$ocLazyLoad', function($ocLazyLoad) {
return $ocLazyLoad.load({
name: 'PSS_AdminApp',
insertBefore: '#ng_load_plugins_before',
files: [
'assets/global/scripts/datatable.js',
'assets/global/plugins/datatables/datatables.min.js',
'assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.js',
]
});
}]
}
```
From the official documentation:
$ocLazyLoad.load({ serie: true, files: [ 'bower_components/angular-strap/dist/angular-strap.js', 'bower_components/angular-strap/dist/angular-strap.tpl.js' ] });
تعریف سئو چیست؟ آموزش SEO - بهینه سازی موتور جستجو
تعریف سئو چیست؟ آموزش SEO - بهینه سازی موتور جستجو
تعریف سئو چیست؟ آموزش SEO - بهینه سازی موتور جستجو
تعریف سئو چیست؟ آموزش SEO - بهینه سازی موتور جستجو
تعریف سئو چیست؟ آموزش SEO - بهینه سازی موتور جستجو
تعریف سئو چیست؟ آموزش SEO - بهینه سازی موتور جستجو
5