I have experience using Vue in previous projects but I'm currently facing some challenges on how to pass information/arguments to a root Vue 3 component. My goal is to set up something like this in my HTML:
<div class="nav-app" nav="some-nav-jht"></div>
Then, within the mounted()
method, I want to be able to access the nav
attribute like this:
mounted(){
console.log('Here is the value of nav: ' + this.nav);
Can anyone guide me on how to achieve this? It's worth noting that I am working with Vue loaded from a CDN without webpack or similar tools.