What is the `ref` in `<q-layout>` used for?
-
The
ref
is often set as an attribute for<q-layout>
in the documentation. I cannot find an explanation for this, though.<q-layout ref=“layout” view=“hHr LpR lFf” >
{…}
</q-layoutIn what scenario should I use this?
-
allows you to reference it somewhere in your code…
look here: http://quasar-framework.org/components/layout.html
-
its a reference to that component, allows you to access its methods. so you can do
$refs.layout.toggleRight()