[英]how to add laravel blade syntax inside vue.js?
I started working on a small project using vue.js and laravel , and i would like to know how can i put blade syntax inside vue.js template code or inside axios for example:
axios.post("{{ route('myRouteName') }}", $('#add-related-contact'))
謝謝
您應該首先使用組件道具將路由傳遞給您的組件,然后您可以使用它。
前任。
<your-component :route="{{ route('myRouteName') }}">
</your-component>
...
methods: {
...
MethodUsingAxios(){
axios.post(this.route);
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.