Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SamarRizvi
Copy link

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.

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.
@matoilic
Copy link
Owner

matoilic commented Nov 1, 2016

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants