1

Is it a way to use similar functionality like angular 1 has to embed template in index.html file:

<script type="text/ng-template" id="app/klasses/klass-detail/klass-detail.component.html">
  your template here
</script>

The reason that I am asking for it is problem of caching static files (*.html) by browser and potential update to template could not be pick up if browser has not caching off - I can not depend on it - also would limit numbers of requests....

Ross
  • 1,313
  • 4
  • 16
  • 24
bensiu
  • 24,660
  • 56
  • 77
  • 117
  • Angular2's `@Component`s have the `templateUrl` attribute. Have you seen it? – acdcjunior Jul 20 '16 at 02:36
  • Or inlIne template using 'template' attribute – Arpit Agarwal Jul 20 '16 at 02:55
  • Yes I know about templateUrl and in-line templates - questions is about embedding template in script tags... – bensiu Jul 20 '16 at 03:55
  • 1
    Angular doesn't provide support for templates in script tags. You can use something like http://stackoverflow.com/questions/36008476/how-to-realize-website-with-hundreds-of-pages-in-angular2 to create components dynamically where you pass the template as string but it's a hack. – Günter Zöchbauer Jul 20 '16 at 05:58

0 Answers0