1

How i add css and html separately in vue js

i am beginner in vue and learn vue js but few question in my mind how can i add separately css and html file like an angular thanks in advance.

0

1 Answer 1

1

You could make a single file component like :

<template>
  <div>This will be pre-compiled</div>
</template>
<script src="./my-component.js"></script>
<style src="./my-component.css"></style>
Sign up to request clarification or add additional context in comments.

3 Comments

you means i create three separated file eg component.js , component.css and component.HTML and import component.js , component.css path in component.HTML
three files, component.vue which contains the code above and the .js and .css files
also, you can write your css code directly in component, inside <style></style>. Moreover, it allows to separate your styles for particular components using attribute scope for <style>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.