generator-angular-lazy icon indicating copy to clipboard operation
generator-angular-lazy copied to clipboard

Added gulp-angular-embed-templates to embed templates from templateURL

Open SamarRizvi opened this issue 8 years ago • 1 comments

Added gulp-angular-embed-templates so that one does not have to use absolute paths for templateURL for modal windows and template from templateURL is automatically embedded during build.

SamarRizvi avatar Nov 01 '16 12:11 SamarRizvi

This is something the included bundler does by default if you import your templates instead of using the templateUrl parameter, see this as an example https://github.com/matoilic/angular-lazy-workshop/blob/master/src/components/git-hub-file-browser/git-hub-file-browser-directive.js#L1.

Thus, gulp-angular-embed-templates in the project setup duplicates existing functionality. If you come across a case where you need to populate the template cache to pass a template to a 3rd-party library, first import it and then put it in the cache. But so far, all libraries I've used had an option to pass templates as a string and this way it was sufficient to import the template and pass it as parameter.

Do you have a case that cannot be covered by using the existing import functionality?

matoilic avatar Nov 01 '16 19:11 matoilic