@extends('rapyd::demo.demo')
@section('title','DataEmbed')
@section('body')
DataEmbed
DataEmbed can embed a url and then isolate it in the dom.
So you can build multiple widgets in page, and all actions will be execued without page reload
Scenarios (where you cant reload the page):
- a form in a bootstrap modal
- a login-form in a cached page
- a comment widget in a static page
You have only to give the endpoint url and an id, then it will be loded and will work isolated in the dom.
{!! $embed1 !!}
{!! $embed2 !!}
Requirements are jquery, riotjs, pjax in your master layout:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.pjax/1.9.6/jquery.pjax.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/riot/2.2.4/riot+compiler.min.js"></script>
{!! Rapyd::scripts() !!}
<script>riot.mount("*")</script>
..
</body>
{!! Documenter::showMethod("Zofe\\Rapyd\\Demo\\DemoController", "getEmbed") !!}
{!! Documenter::showMethod("Zofe\\Rapyd\\Demo\\DemoController", "getNudegrid") !!}
{!! Documenter::showMethod("Zofe\\Rapyd\\Demo\\DemoController", "anyNudeedit") !!}
{!! Documenter::showCode("zofe/rapyd/views/demo/embed.blade.php") !!}
@stop