How to pass props when dynamically creating a component?

I’m creating a component dynamically (after a button click), using this commonly followed tutorial. The basic code is:

import Building_Info from './Info_Zone/Building'
var Building_Info_Class = Vue.extend(Building_Info)
var building_info_instance = new Building_Info_Class()

However, my Building_Info component requires a prop. How can I pass it in? Alternative ways to dynamically creare components are welcome, though ideally they’d support Single File Components.

It describes how to do this in the article you posted, right here.

var building_info_instance = new Building_Info_Class({
  propsData: { type: 'primary' }
1 Like

D’oh, thanks. Hopefully some future person googling this question will benefit from my stupidity.

Do not worry, trust me ont his one, I have done many questions that could be considered that I am a newbie on a subject but those questions guide people in many ways that you have no idea. So, it is ok to ask always.