Skip to content

Navigation Menu

Sign in
Sign up

RaguDom: Configuring the client

Maniero edited this page Sep 14, 2020 · 4 revisions

RaguDOM aims to fetch remote components from Ragu Server.

Instalation

npm install ragu-dom

All you need to do is to register the ragu custom element:

const {registerRaguComponent} = require("ragu-dom");
registerRaguComponent();

The script above required transpilation.

If you don't want to setup the webpack by yourself, you can just use the [https://www.jsdelivr.com/package/npm/ragu-dom?version=latest](jsdelivr CDN).

<script src="https://cdn.jsdelivr.net/npm/ragu-dom@latest/ragu-dom.js"></script>
<script>
 RaguDOM.registerRaguComponent();
</script>

Rendering components:

You can just render a remote ragu component by adding this code fragment at you HTML.

<ragu-component src="https://ragu-cart-vuejs.herokuapp.com/components/cart"></ragu-component>

Clone this wiki locally

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /