Skip to content

Vuejs Notes

Resources

Replacement resources

Notes

Wordpress

Tutorials

Components

Importing vue components - script.ts - template.html

<div class="grid-container">
    <h1>{{msg}}</h1>
    <marvel-proto></marvel-proto>
</div>
  • script.ts
import MarvelProto from './../MarvelProto/MarvelProto.vue'
export default {
    components: {
        MarvelProto,
    },
    data: () => (
        {
            msg: "User List",
        }
    ),
};

Creating new project with vue-cli

  • Setup the proxy
  • In vue.config.js
  devServer: {
    proxy: 'http://localhost:5000'
  }
  • Setup typescript
    • npm install -D @vue/cli-plugin-typescript
    • vue invoke typescript