Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Add ng-hide or ng-show to DIV #343

Open
eudennis opened this issue Mar 18, 2015 · 3 comments
Open

Add ng-hide or ng-show to DIV #343

eudennis opened this issue Mar 18, 2015 · 3 comments

Comments

@eudennis
Copy link

How could I add AngularJS directives to DIV? I want to make a filter for all those divs inside timeline.

@josdejong
Copy link
Contributor

You can put arbitrary HTML in the contents of an item. I don't think that putting angular directives inside items will work nicely (if it works at all).

Note that the successor of chap-links-library, vis.js, supports templates, maybe these address your use case? See this example: http://visjs.org/examples/timeline/27_templates.html

@eudennis
Copy link
Author

I will take a look. My objective is to make filters to show/hide specific categories.

@josdejong
Copy link
Contributor

My objective is to make filters to show/hide specific categories.

In that case you may find the DataSet and DataView of vis.js interesting: with a DataView you can put a filter on a DataSet. You can specify a filter function like function (item) {return item.category === selectedCategory}. Every time the selectedCategory is changed, you can just call dataView.refresh() and the connected Timeline will automatically update the view.

Docs:
http://visjs.org/docs/dataset.html
http://visjs.org/docs/dataview.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants