Angular 2 examples - result and settings
See original GitHub issueAre you requesting a feature, reporting a bug or ask a question?
Question: I worked with your Angular examples and get the survey running. However how to reach the result data? Sorry, my limited knowledge of Angular didn’t help.
What is the current behavior?
Can’t get the result into a custom function (leading to an Angular service).
What is the expected behavior?
To obtain the results in a variable, and to be able to insert settings.
How would you reproduce the current behavior (if this is a bug)?
Provide the test code and the tested page URL (if applicable)
Tested page URL:
Test code
export class SurveyComponent implements OnInit, OnDestroy {
private surveyJSON: any;
constructor(){}
ngOnInit() {
let params: any = this.activatedRoute.snapshot.params;
this.surveyJSON = this._drpService.getSuveyJson(+params.id);
const survey = new Survey.ReactSurveyModel(this.surveyJSON);
Survey.SurveyNG.render('surveyElements', { model: this.survey });
}
Specify your
- browser:
- browser version:
- surveyjs platform (angular or react or jquery or knockout or vue):
- surveyjs version: 0.12.17
THANK YOU! Best, Roeneman
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Sharing data between child and parent directives ... - Angular
A common pattern in Angular is sharing data between a parent component and one or more child components. Implement this pattern with the...
Read more >Cheat Sheet - Angular
Declares an output property that fires events that you can subscribe to with an event binding (example: <my-cmp (myEvent)="doSomething()"> ).
Read more >Getting started with Angular
Prerequisiteslink · Take a tour of the example applicationlink · Create the sample projectlink · Create the product listlink · Pass data to...
Read more >Attribute directives - Angular
Change the appearance or behavior of DOM elements and Angular components with attribute directives. See the live example / download example for a...
Read more >Transforming Data Using Pipes - Angular
Chain pipes so that the output of one pipe becomes the input to the next. In the following example, chained pipes first apply...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thank you, got it sorted. This is my solution:
Thanks for your help, so indeed it was not surveyJs but actually I believe a typescript issue. Best, Roeneman
@rroeneman you could create an example in plunker based on one of our examples (https://plnkr.co/edit/?p=preview) and we will try to help you.