Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Expression extractor does not find templatesUrls in 'web' directory #1623

Closed
rkirov opened this issue Dec 12, 2014 · 3 comments
Closed

Expression extractor does not find templatesUrls in 'web' directory #1623

rkirov opened this issue Dec 12, 2014 · 3 comments
Assignees

Comments

@rkirov
Copy link
Contributor

rkirov commented Dec 12, 2014

Sample app:
web/main.dart

@Component(
  templateUrl: 'myTemplate.html'

myTemplate.html is in web/ but the transformer looks for it in package root.

pub build
> line 11, column 1 of web/main.dart: Unable to find mytmp.html at shadow_demo|mytmp.html

This manifests rather nastily during runtime as a Missing getter: (o) => o.foo error.

@rkirov
Copy link
Contributor Author

rkirov commented Dec 12, 2014

Current workarounds:

  • move components and their templates into lib/ (best practice for large applications) and use packages/<my_package>/myTemplate.html.
  • specify html_files in the angular transformer as follows:
transformers:
- angular:
    html_files:
      web/mytmp.html

@naomiblack
Copy link
Contributor

@rkirov can we move this over to the wiki instead of an issue? :)

@rkirov
Copy link
Contributor Author

rkirov commented Jan 27, 2015

Will be closed by #1652.

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

No branches or pull requests

2 participants