I am trying to use external components with Vue Typescript Class Components. I've installed standard template and modified its <script>
block according to instruction:
import { Vue, Component, Prop } from "vue-property-decorator";
@Component
export default class App extends Vue {
msg: string = "Hello";
}
But I am getting an error: No known component for element RadSideDrawer
.
I also tried to include RadSideDrawer
to @Component
options with no success:
import { Vue, Component, Prop } from "vue-property-decorator";
const RadSideDrawer = require('nativescript-ui-sidedrawer').RadSideDrawer;
@Component({
components: {
RadSideDrawer,
}
})
export default class App extends Vue {
msg: string = "Hello";
}
All my component code is here. I didn't modify any other parts of the template, so I have this lines in main.ts
:
Vue.registerElement(
'RadSideDrawer',
() => require('nativescript-ui-sidedrawer').RadSideDrawer,
);
But it doesn't work. How to use RadSideDrawer with class components?