VueDay
Verona
12/04/2019
Nicolò (Nico) Maria Mezzopera
@DonNicoJs
Nicolò (Nico) Maria Mezzopera
Senior Frontend Developer @ Pulilab
More than 8 years of experience
Vue2Leaflet maintainer
vue-xlsx author
Standalone functionality
Reusable across different web apps
Show off 'VueJs'
No UI library / Whitelabeled
Completely customisable with props and slots
Check the code: https://github.com/pulilab/vue-django-feedback
<script src="//unpkg.com/vue-django-feedback/dist/packaged/vue-django-feedback.js"></script>
<vue-django-feedback
meta="{{vm.meta}}"
name="{{vm.user.profile.name}}"
email="{{vm.user.profile.email}}"
auth-token="{{vm.token}}"
submit-button-text="{{'SUBMIT' | translate }}"
global-error-warning="{{'ERROR' | translate }}"
name-label="{{'Your name' | translate }}"
email-label="{{'Your email' | translate }}"
subject-label="{{'Subject' | translate }}"
message-label="{{'Message / Question' | translate }}"
>
<span vue-slot="header-text">
<translate>
Ask our experts!
</translate>
</span>
</vue-django-feedback>
Legacy component in SSR Page:
<template>
<div class="angularjs">
<div id="thematicjs" />
<!-- placeholder to avoid a flash of content -->
<a
v-if="!initialised"
class="HeaderBtn ToolkitBtn"
>
<translate>Toolkit</translate>
</a>
</div>
</template>
<script>
export default {
data () {
return {
initialised: false
};
},
async mounted () {
await this.$nextTick();
const { factory } = await import('@/angular/Thematic/thematicFactory');
factory(0, 0, this.$gettext('MAPS Toolkit'), 'HeaderBtn', this.$gettext('Toolkit'));
this.initialised = true;
}
};
</script>
AngularJs Page
<template>
<div class="angularjs">
<div id="cmsjs" />
</div>
</template>
<script>
export default {
async mounted () {
const { cmsFactory } = await import('@/angular/Cms/cmsFactory');
cmsFactory();
}
};
</script>
Let's check the code: https://codesandbox.io/s/j3246j07kw
Special thanks to: https://github.com/coding-jam/angularjs-todo-list-components
Let's check the code: https://codesandbox.io/s/j3246j07kw