WearyMonkey / ngtemplate-loader

Include AngularJS templates in the Webpack bundle and preload the template cache.
MIT License
238 stars 78 forks source link

Trouble loading templates #5

Closed ronnross closed 9 years ago

ronnross commented 9 years ago

We are using the ngtemplate-loader, but cannot get it to work even after following the example in the readme. Could you help? https://github.com/ronnross/angular-webpack-example

WearyMonkey commented 9 years ago

Hi @ronnross, thanks for trying it out.

I've made a pull request here: ronnross/angular-webpack-example#2

The main issue is that ngtemplate loader has a dependency on HTML or Raw loader.

The was also a mistake in the Read Me which I am fixing now.

ngtemplate loader tries to do the bare minimum, it just takes the HTML it's given and loads it into the cache. That way you can you use any other loader you like to do the image url resolution, minifying etc.

That said, I do like that ng-cache uses the global module 'ng' which reduces the config, I think I'll borrow/steal that idea :)