Reputation:
I am new to VueJS
, when I try to compile this code it works fine:
<template>
<div id="users-table">
<ServerTable url="users" :columns="columns" :options="options"></ServerTable>
</div>
</template>
However when I add another tag (any tag) like that:
<template>
<h1>Header</h1>
<div id="users-table">
<ServerTable url="users" :columns="columns" :options="options"></ServerTable>
</div>
</template>
I am getting an error
Module build failed (from ./node_modules/vue-loader/lib/loaders/templateLoader.js):
RangeError: Invalid string length
at repeat$1
What am I doing wrong?
Upvotes: 1
Views: 1194
Reputation: 2375
Just put the whole content in a single root element.
<template>
<div>
<h1>Header</h1>
<div id="users-table">
<ServerTable url="users" :columns="columns" :options="options"></ServerTable>
</div>
</div>
</template>
Upvotes: 1