Added gulp-angular-embed-templates to embed templates from templateURL#32
Added gulp-angular-embed-templates to embed templates from templateURL#32SamarRizvi wants to merge 3 commits intomatoilic:masterfrom
Conversation
Added gulp-angular-embed-templates so that one does not have to use absolute paths for templateURL for modal windows.
Added embedTemplates which embeds templates whereever templateURL is found so that one does not have to use absolute paths for templateURL for modal windows.
Added Compile source for html so that whenever a physical template html file changes, the resulting template is automatically embedded into where templateURL is used.
|
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? |
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.