angular-timelinejs3
angular-timelinejs3 copied to clipboard
How do I load data into the time line?
I have the wrapper installed and I am using the control but I can't figure out how to load the data using directive? Is there a way to call setData or do I have to call TL.timeline ( 'ngtimeline', mydata);?
Hi, you can have a look at the demo timeline.
You can use the $scope.timeline.setData(...)
method to push your data to the timeline.
This is usually done in a controller wrapping the html directive <timeline control="timeline" height="500px" options="options"></timeline>
Here the naming convention is important, if you name your timeline 'foo', <timeline control="foo" height="500px" options="options"></timeline>
then you'll have to use $scope variable $scope.foo
!
Hope this helps