title: Expression in ng-controller for a JSON-Objects with AngularJS and Ionic
body: <p>I parse JSON objects to create html elements. In my case, I create from json file Buttons:</p>
  
  <pre><code>{
      "type": "button",
      "id": "comButton",
      "icon": "ion-chatboxes",
      "name": "Communication",
      "onclick": "",
      "controller": "somemthctrl",
      "ngclick": "launchSomemethod()",
      "color": "white",
      "backgroundcolor": "#ff5db1",
      "font-size": "20px"
  }
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>myApp.controller('generateButtonCtrl', function ($scope, $http) {
      $http.get('JSON/buttons.json').success(function(data){
          $scope.components = data;
      });
  });
  </code></pre>
  
  <p>From the HTML page, I call the components from the json file:</p>
  
  <pre><code>&lt;a ng-repeat="component in components"
     style="color:{{component.color}}; background-color:{{component.backgroundcolor}} "
     id="{{component.id}}"
     class="{{component.type}}"
     href="{{component.onclick}}"
     ng-click="{{component.ngclick}}"
     ng-controller="{{component.controller}}"&gt;
  
      &lt;i class="{{component.icon}}"&gt;&lt;br&gt;&lt;/i&gt;
      {{component.name}}
  &lt;/a&gt;
  </code></pre>
  
  <p>In the case <code>ng-click="{{component.ngclick}}"</code> und <code>ng-controller="{{component.controller}}"</code> will not be included. </p>
  
  <p>At the appropriate places I get from my editor WebStorm following error: <strong>Identifier or String literal or numeric literal expected.</strong></p>
  
  <p>I have a <code>{{expression}}</code> Problem. How can I integrate the <code>ng-controller</code> and <code>ng-click</code> as a string from a json object?</p>