mainio-survey v0.1.5
Mainio Survey
Angular 6 web component application that provides ease of integration of SurveyJS formatted surveys to any app and website
Install
Install mainio-survey
npm i mainio-survey
oryarn add mainio-survey
Install peer dependencies
npm i @angular/core @angular/common @angular/elements @webcomponents/custom-elements @angular/cdk survey-angular uuid
Add polyfill
import '@webcomponents/custom-elements/src/native-shim';
Add basic SurveyJS styles to your index.html
<link href="https://surveyjs.azureedge.net/1.0.32/survey.css" type="text/css" rel="stylesheet"/>
Usage
Pass the data to mainio-survey element via component inputs:
<mainio-survey api="assets/mock" survey_id="survey-1" user_id="user123">No survey data received.</mainio-survey>
Or via window-object
<script>
window.MainioSurveyData = { api: "assets/mock", survey_id: "survey-1", user_id: "user123" };
</script>
You can use our Demo project as a starting point.