I want to use a library like chart.js or d3.js inside angular 2. I understand how to make it work by passing them an ElementRef, but that would bypass the renderer. Is there any way (apart from rewriting chart.js or d3.js) to make the DOM manipulation of such libraries go through the angular 2 renderer so that server side rendering is still possible?
If not, I still want to prerender most of my page on the server. What would be the best way to detect if you're running in an environment where direct DOM manipulation isn't possible so that you can skip rendering certain directives?