I am trying to build a set of dynamic tabsets with dynamic content,
http://plnkr.co/edit/bhtMin1B1dwwqYvyrpVl?p=preview
1) Clicking on Dashboard opens a new tab with directive
- When I provide the content of a as the directive, this gets rendered as a string.
- I've tried to use the html bind unsafe and $compile functions to make this run as an Angular component - but haven't be able to
2) Click on menu [Project Management-> Project] shows a list of Sites, on clicking of which I need to open another tab passing a parameter (Proj-ID or Site-Id)
- The idea is to call a function on click of the Site Name, I'll open a new tab with content as a directive
- But since I am stuck with the previous problem, I am not able to do this
- Is this the right way of passing params to the directive.
Right now, the plunkr tries to o/p the tab content as a file, a string and compile - with no success
[I've revised this question with relevant details from a prev question]
SOLUTION FOUND FOR #1:
For some reason ng-bind-html-unsafe doesn't work with Angular Elements. I had to do create a compile directive http://docs.angularjs.org/api/ng.$compile, based on info I found here on STO
I found a solution here.. http://stackoverflow.com/questions/17417607/angular-ng-bind-html-unsafe-and-directive-within-it – Jaya Aug 17 '13 at 00:26