0
import * as Survey from 'survey-core'
var surveyModel = new Survey.model(myJson)

Survey is coming to be as undefined causing an error TypeError: Survey.Model is not a constructor

I have imported survey-core library and included it in the project but i am facing this issue.

NOTE: If I work with survey-jquery then it works fine. What should I do?

1 Answer 1

1

You need to use the Survey.Model (Model from the capital letter) instead of Survey.model

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.