I have requirement where the user will be asked a series of questions from 1-5 and the questions will come in a loop like first the user answers first question and then clicks next to the next question and he can also go to the previous question . and when question ends he will submit.
i am trying to loop through a div containing multiple div's nut i am getting a error using view child in angular 2
dummy data
<div #message>
<div>
Here
</div>
<div>
Here again
</div>
</div>
</div>
<div *ngFor = "let in of input">
{{in}}
</div>
@ViewChild('message') input :ElementRef;
Console log
XCEPTION: Uncaught (in promise): Error: Error in http://localhost:3000/app/questioncomponent/question.component.html:14:5 caused by: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.
Error: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.
at new Error (native)
at NgFor.ngOnChanges (http://localhost:3000/node_modules/@angular/common/bundles/common.umd.js:1646:31) [angular]
at Wrapper_NgFor.ngDoCheck (/CommonModule/NgFor/wrapper.ngfactory.js:49:20) [angular]
at DebugAppView.View_QuestionComponent0.detectChangesInternal (/AppModule/QuestionComponent/component.ngfactory.js:102:20) [angular]
at DebugAppView.AppView.detectChanges