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

Support for inline templates? #77

Open
alferz opened this issue Jul 14, 2015 · 2 comments
Open

Support for inline templates? #77

alferz opened this issue Jul 14, 2015 · 2 comments

Comments

@alferz
Copy link

alferz commented Jul 14, 2015

It looks like inline templating is not currently supported by the preprocessor. ie, templates inside a
script id="tpl.html" type="text/ng-template"
tag that are embedded in other HTML. Instead, the processor just lumps the entire HTML file into one object in the $templateCache. Is it possible to parse out the individual inline templates in some way or is this a future initiative?

@jrharshath
Copy link

Bumping this issue again. I've encountered the same issue as well.

I've got several simple templates related to a single module defined in a single html file, and all of them are defined in their own <script type='text/ng-template' id='template-id'> block. Each of these templates are referenced by a single a single directive using templateUrl: 'template-id' in their directive definition objects.

However, since ng-html2js simply puts the contents of entire files into the template cache, unit tests for those directives fail with the error Unexpected request: GET template-id.

It would be nice if ng-html2js could go through the html files supplied to it, and also put the inline templates found into the template cache.

@jrharshath
Copy link

Going through other open issues, I found that issue #31 is identical to this, so this can be closed.

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

No branches or pull requests

2 participants