OK, so I'm a bit confused about where to go with a Nova resource tool I've built. My resource tool allows the user to select a quiz from a dropdown, and generate a new 'take' - i.e. an instance of taking the selected quiz. It adds the 'take' to a list under the dropdown and all is good....
What I wanted to do from here is to click on a 'take' in the list and open a new browser window, so the user can see all the questions in a list and answer them. I worked out how to add a blade template to my resource tool and how to pass the quiz data to the new page to render.
But...I wanted to use Vue in the new window, and this is where I come unstuck. I can't work out how to import vue and use it. I keep getting a 'Uncaught SyntaxError: Unexpected identifier' on my import statement??
<script>
import Quiz from "../resources/js/components/Quiz.vue"; // Uncaught SyntaxError: Unexpected identifier
const app = new Vue({
el: '#app',
components: { Quiz }
});
</script>
I thought of creating a new tool just to be the quiz 'take' page, but I can't work out how I would pass the data to that?
I'm not sure if I'm being thick, or just approaching this in the wrong way?
Any suggestions?