You've named the attribute "name-attribute" which will map to a variable "nameAttribute" in your angular directive.
Rather than try to have this in your scope... name: "=nameAttribute" Use this in it's place... nameAttribute: "=" Then bind to the property "nameAttribute" instead of "name". You'll have your binding. Take a look here: http://plnkr.co/edit/p9B5hpPJkZrHS4YHVi7a?p=preview Hope that helps! DC On Monday, January 20, 2014 10:20:50 AM UTC-5, Fordio wrote: > > Hi, > > I'm new to AngularJS and I have created a custom directive that has an > isolated scope. The directive has an attribute to bind a property from the > parent scope to the isolated scope. > > My controller adds a property to the parent scope, then in the post link > function I try to access the property from the isolated scope. Problem is, > although the property exists, it's value is undefined. > > I created a plnkr <http://plnkr.co/edit/V8M3GcwB8AgUtnGMGk3m?p=preview> to > try and recreate the issue, but my plnkr works correctly - which at least > suggests I understand what I have to do properly. > > I have checked, double checked and triple checked for any typos in > variable names and in the attribute. In case it matters, the property is a > promise - but I don't see why this should make any difference. > > Any ideas would be gratefully received... > > > -- 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/groups/opt_out.
