简体   繁体   中英

How to use RiotJS custom tags with Laravel 5.5?

I have a tag called invoice.tag which contains a html code that a want to repeat several times. And i want to use that tag in a view called add.blade.php . And in the end of that view i wrote this to call the invoice tag:

@section('bottom')
    <script src="{{asset('components/invoice.tag')}}" type="riot/tag"></script>
    <script>
        $(document).ready(function(){
            riot.mount('invoice');
        })
    </script> @endsection

But it doesn't work. I think it's because a version conflicts, so, anyone knows the correct syntax to use Laravel with RiotJS?

在主刀片文件中,例如resources/views/layouts/app.blade.php ,确保您包含相应的代码以在所需页面的位置显示bottom

@yield('bottom')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM