Skip to content
This repository was archived by the owner on Dec 26, 2018. It is now read-only.
This repository was archived by the owner on Dec 26, 2018. It is now read-only.

Is there an example or docs on how to use vue files for compnents #142

Closed
@pajtai

Description

@pajtai

Trying some variations on the following but getting various errors:

// main.js
var Vue = require('vue');
var Counter = require('./myCounter/myCounter.vue'); // a component
var Stage = require('./stage/stage.vue'); // top level view


Vue.component('my-counter', Counter);

var app = new Vue({
    el: '#stage',
    render: function (createElement) {
        return createElement(Stage)
    }
});

Think I'm just doing something fundamentally wrong, but all the jsfiddle examples - http://vuejs.org/examples/ - use template tags instead of vue files, so I'm having trouble debugging.

Thanks for any help / pointers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions