DEV Community

loading...

Discussion on: Kentico 12: Design Patterns Part 16 - Integrating Vue.js with MVC

Collapse
seangwright profile image
Sean G. Wright Author

Randa, I'm glad the post was helpful!

What DOM element is your Vue component hooking into, and where in the Razor files is that DOM element located?

Do you have any errors in the console when using Preview/Edit mode in the CMS?

The Page Builder functionality loads a lot of additional JavaScript, so there could be an issue happening when those files are loaded.

Collapse
randa74929705 profile image
Randa

Thanks for your help
I follow your steps in attaching Vuejs with kentico(by the way I am a front end not backend)
I am trying to figure out why in the preview my vue components appear there, but in the edit mode for the admin not, any text or variables in Razor appear ordinary in the admin but any vue component not in edit mode only appear in preview or front end side(live preview)
Can I enable admin user to edit vue component wizard from kentico admin like the rest?
I have no errors in console
I have _layout razor
dev-to-uploads.s3.amazonaws.com/i/...

my root component(sandbox-home) (Home page)
dev-to-uploads.s3.amazonaws.com/i/...

Thread Thread
seangwright profile image
Sean G. Wright Author

Randa,

Hm, I'm surprised that doesn't work. Everything looks correct.

It's very strange that viewing the site in Preview behaves differently than Page Edit, especially since the Vuejs code/markup isn't inside a Widget/Section view.

I've not been able to reproduce your issues on my end, but there are many different ways to manage client-side assets with Kentico 12 MVC, so there could be something happening there.

I'll see if I can get a minimal setup pushed up to GitHub.

Forem Open with the Forem app