Wordpress PHP variable to Vue Component -


i building wordpress theme , incorporate vue.js (2.0) it. need able pass variables wordpress vue, such page or post content. attempting return page content.

i attempted method didn't seem work either: pass php variable vue component instance

in page template have following:

<content inline-template :content="{{ $content }}">     <div id="content" class="">      </div> </content> 

the component:

vue.component('content', {    props: ['content'] });  new vue({   el: "#app" }); 


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -