Open gitkeerthi opened 7 years ago
You need to load like the following. For example, for the js we need to use like,
$ocLazyLoad.load({
insertBefore: '#loadJsBefore',
name: 'fancyTreeJs',
files: [{ type: 'js', path: 'bundles/fancytree' }]
});
Here is what I have.
/myservice/test/css is actually a RESTful URL endpoint on the server-side generating a CSS file dynamically. When I enter this URL directly in the browser's address bar, the content loads in the browser window. However ocLazyLoad fails to load with an error "Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'."
If I modify the server side code such that the published RESTful URL endpoint now becomes '/myservice/test.css', then ocLazyLoad is able to load.