question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I declare template option in component? Still migrating from vue 1.0 to 2.0, have been using typescript in components without decorators, and used a lot of template: <div> ... option in my .ts files. Can I just declare template=<div>.. ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
HerringtonDarkholmecommented, Oct 29, 2016

Under consideration. If you prefer string template, it means your code needs extra overhead of client side compilation and size bloat. But I believe that user experience should overweight developer experience.

I don’t want to promote this by default. Developer must enable it explicitly. So comes the module augmentation.

For now You can use the code above. Putting it in the entry file should apply to the whole project.

0reactions
mvujicacommented, Oct 30, 2016

Also one small thing for using props: compiler complains if p is not imported so it should be: import { Component, Prop, p, Watch, Lifecycle, Vue } from "av-ts";

Read more comments on GitHub >

github_iconTop Results From Across the Web

Free templates - Canva
Browse through our professionally designed selection of free templates and customize a design for any occasion.
Read more >
200,000+ Templates, Documents and Designs | Template.net
Beautifully Designed, Easily Editable Templates to Get your Work Done Faster & Smarter. Simply Browse, Search, Save & Download our Easy to use...
Read more >
Create more with Microsoft templates
Choose from thousands of free or premium Microsoft Office templates for every event or occasion. ... Excel, PowerPoint template that's a perfect fit....
Read more >
Template Definition & Meaning - Merriam-Webster
The meaning of TEMPLATE is a gauge, pattern, or mold (such as a thin plate or board) used as a guide to the...
Read more >
10000+ Free Templates 2022 - Nicepage
Free download of the best templates for multi-purpose websites. Build responsive, fully customizable websites with an easy drag-n-drop templates builder.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found