Any updates on solution? Ran into the same problem On Tuesday, October 2, 2012 10:04:31 AM UTC-7, Olivier Clément wrote: > > Hi all, > > I want to build a directive to wrap D3js. I saw Brian Ford's blog post > <http://briantford.com/blog/angular-d3.html> which is nice and working, > but I want to do more than that. > > Correct me if this is not how I should do this: > I want to use attributes in my directive (an element) to configure my d3 > instance. This way I can set the source, get the JSON from inside the > directive (using a Directive Controller I guess?) and build from there. > > So I have this: <directive-name > source='stringUrl_to_webservice'></directive-name> > > If I log $scope from the directive's controller or link function, I can > see the *source* attribute being correctly set. > But as soon as I try to access it directly ($scope.source), I get > undefined, from either locations > > Here's a quick Plunker: http://plnkr.co/edit/DSpm6L?p=preview (open your > console) > > I'm not sore what I am doing wrong, or if this really should be the way to > go > > Thanks > > >
-- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
