Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants