Hi there,
I’ve created a survey on SurveyJS’s Visual Editor, and noticed that it provided the option to be embedded on a website. It had a snippet specifically for AngularJS (shown below) and I wondered if it would be possible to integrate my survey into an Ionic app.
I’ve already tried integrating it a couple of times but it kept leading to an error believed to be internal to the surveyJS library.
SURVEYJS ANGULAR SNIPPET:
Survey.Survey.cssType = “bootstrap”;
var surveyJSON = { surveyId: ‘00000000-0000-0000-0000-000000000000’}
function sendDataToServer(survey) {
survey.sendResult(‘00000000-0000-0000-0000-000000000000’);
}
@Component({
selector: ‘ng-app’,
template:
})
export class AppComponent {
ngOnInit() {
var survey = new Survey.Model(surveyJSON);
survey.onComplete.add(sendDataToServer);
Survey.SurveyNG.render(“surveyElement”, { model: survey });
}
}
I would appreciate any advice or support.