Question · Vue.js course · Module 8: Slots & Dynamic Components

The 'to' attribute in Teleport

What does the 'to' attribute mean in <Teleport to="body">?

Answer options

  • A CSS selector of the DOM element where the content will be moved
  • The router navigation target
  • The name of the target component
  • A URL to redirect to

You can check the correct answer by solving this task in the CodeWorlds game.