-
Notifications
You must be signed in to change notification settings - Fork 23
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
Handling templates #165
Comments
Hey I'm glad you like our scaffold 🙂 Think is that we are kind of fans of inline templates a it's because this way you tent to keep components small and simple. Anyway if you really really don't want to go inline you can either upgrade to typescript 2 and use declare module "*.html" or simply use require("./yourfile.htm"). If you will upgrade to typescript 2 PR is welcome 😉 |
It would be super neat if the templateUrl syntax worked, as per the angular 2 docs.
You mentioned, |
@blowsie another problem with templateUrl in angular 1 is that it make your component async, quite frankly I'm not sure how does that work in angular 2 as I said we prefer inline 😉 Trick I was mentioning is called wildcard module declarations I'm not sure what is the problem I would check typescript version you are using and related typescript thread microsoft/TypeScript#6615 It should definitely work in our scaffold see 6e91cfd |
Has anyone tried using angular2-template-loader with ng-metadata? That would load both templates and style url automatically. |
this works, but with SystemJS :) (module.id is specific for systemJS ) |
I haven't |
This boilerplate looks really cool, so big thumbs up for it! :) I have one question, how to handle loading templates from a file (I'm not a big fan of inline templates). When I try to do
import template from './template.html'
I'm getting ts error, that it didn't find any module there.The text was updated successfully, but these errors were encountered: