mohsen1 / json-formatter

Angular directive for collapsible JSON in HTML
http://azimi.me/json-formatter/demo/demo.html
Other
372 stars 85 forks source link

How to set value of json attribute in angularjs #57

Open vivekkumar27june88 opened 8 years ago

vivekkumar27june88 commented 8 years ago

Hi

I am new to angularjs and web development, so this question may not be related with to json-formatter only.

Question:

How to give value to json attribute inside of ng-repeat.


            <tr ng-repeat="log in logs">
                <td>{{ $index }}</td>
                <td>{{ log.level }}</td>
                <td>{{ log.time | date:"MM/dd/yyyy 'at' h:mma"}}</td>
                <td>{{ srcFormatter(log.src.file, log.src.line) }}</td>
                <td><json-formatter  json="{{log.msg}}" open="1"></json-formatter></td>
            </tr>
mohsen1 commented 8 years ago

Just pass it without interpolation :

json=’log.msg'