I have updated the plunker, so a quick recap:
On Saturday, February 15, 2014 1:11:29 AM UTC+1, Claus Fjellø-Jensen wrote: > > Hi Dave, > > You are right! - it is not the conversion that fails, it is the assignment > to link's scope that is not reflected in the controllers $scope for some > reason. > > I will post a new plunker when I figured out why that is. > > (The reason to configure the directive in this way is that the actual > directive, an Ace editor with an optional toolbar and status line and a > varying number of rows, is that it is used in a number of places (sometimes > even in the same page) and can easily be configured from within the html to > include or exclude these features using ng-switches in the template). > > Br, > Claus > > On Friday, February 14, 2014 11:09:26 PM UTC+1, Dave Gruska wrote: >> >> Hi Claus, >> I don't know if this gets you anywhere or not, but I got the JSON to >> show up as an object in the console: >> >> http://plnkr.co/edit/ZrvXKKemzToD9m0pU2Qc?p=preview >> >> Not sure why you are doing the config in the HTML, though. >> >> On Friday, February 14, 2014 4:34:42 PM UTC-5, Claus Fjellø-Jensen wrote: >>> >>> Hi, >>> >>> I use the following JSON attribute for directives, that allows me to >>> configure the directive from the html: >>> >>> <my-drt config='{"useBold": false, "addButton": true, "identity": >>> "id_02", "msg": "scope_02"}' ></my-drt> >>> >>> As long as you stick to using constant values, you can read this >>> directly in the link function (without using a $watch function) >>> >>> My problem is, that 'fromJson' seems to fail silently when using angular >>> 1.2.12, as shown in this plunk: >>> >>> http://plnkr.co/edit/tC8LHvNKKKZAwrh8KwKs?p=preview >>> >>> If you change the angular.js script tag in index.html to: src=" >>> http://code.angularjs.org/1.0.8/angular.js", it all works again. >>> >>> Any suggestions? >>> >>> Br, >>> Claus Fjellø-Jensen >>> >> -- 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.
