angular-timelinejs3 icon indicating copy to clipboard operation
angular-timelinejs3 copied to clipboard

How do I load data into the time line?

Open LWadford opened this issue 6 years ago • 1 comments

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);?

LWadford avatar Mar 14 '18 18:03 LWadford

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

fmaturel avatar Mar 15 '18 14:03 fmaturel