Alright, so I’m working on making a single custom header directive to use across the app I am working on, however I have run into issues with data binding.
A quick intro, I have a header directive currently implemented, with it’s own isolated scope. Now on certain pages of the app, I need a favorite star to be added to the header. This favorite star is setup as it’s own directive, with it’s own isolated scope as well. I am inserting the star using ng-transclude in my custom header directive, however I am unable to pass any value from the controller, to the favorite star directive. They are always coming through as undefined. (You can see this by clicking the star in the header, and seeing the undefined values in the console logs in the linked codepen)
Here is the codepen with just the relevent code: http://codepen.io/ms1752/pen/zhujB