Timeline.js + MVC + JavaScript
I am having the following code on my view
@{
var objs = objstudent.Timelines.Where(x => x.StudentID == Sessions.objStudent.StudentID).AsQueryable();
}
<script type="text/javascript">
@{
@:var data = [];
foreach(Student.Models.Timeline student in objs)
{
@:data.push({start : new Date "@student.MeetingDate", content : "@student.Description" });
}
}
here I am trying to add details in data array which will be used for displaying details in timeline, but when I check data's value in browser it shows me undefined.
I have tried using but problem is same.
any solution ?