edgardleal/require-vuejs

View on GitHub
examples/component.html

Summary

Maintainability
Test Coverage
<template>
    <div id="div2">{{text}}</div>
</template>

<script>
    define(["Vue"], function(Vue) {
        console.log(" registering the component my-component2");
        Vue.component("my-component2", {
            template: template,
            data: function() {
                return {"text": "Ok from component.html"};
            }
        });
    });
</script>

<style>

div#div2 {
    border: 1px solid red;
}
</style>
/* vim: set tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab : */