I want to generate html, not to replace the content of #app, but to add to #app, how can I change it?

I want to generate html, not to replace the content of #app, but to add to #app, how can I change it?

With magic and possibly asking the forum properly?

I want a BWM how can I get one? Can you help me :slight_smile:

You need to be specific / show code/ what works / whats not working.

Simply saying how can I change it? I say change it!
What ever you are doing dose not work so simply change it. Your not going to get help if people cant see the effort you put into the problem.

if you need something like:

<body>
  <div id="app">
    <!-- app content here -->
  </div>
</body>

just $mount() your Vue instance in a child of the #app.

not to replace the content of #app, but to add to #app

You can’t change that directly but you can mount to a child of #app and that child will be removed rather than #app itself.

e.g.:

<div id="app">
  <!-- possibly other stuff here -->
  <div id="targetChild"></div>
  <!-- possibly other stuff here -->
</div>

with:

new Vue({
  el: '#targetChild',
  // ... etc.
})

If you need to do it dynamically then add the extra <div> just before you need it using the standard browser DOM APIs, e.g. createElement and appendChild.