Address component

The LemonadeJS address library is a micro library. It helps to create a address field based on a defined template. It brings a input with a pre-fix pointing to the domain.

Documentation

Properties


Usage example



Source code

<script>
var Component = function() {
    var self = {};

    self.domain = window.location.origin + '/';
    self.user = 'user';

    var template = `
         <>
             <Social domain="{{self.domain}}" user="{{self.user}}"/>
         </>`;

    return lemonade.element(template, self, { Social });
}

    document.addEventListener("DOMContentLoaded", function() {
    lemonade.render(Component, document.getElementById('address'));
})
</script>