Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app="app">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.1/angular.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/angular-filter/0.5.4/angular-filter.js"></script>
  
<meta name="description" content=""/>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div ng-controller="MainController"> 
    
<ul ng-repeat="(key, value) in permissions | groupBy: 'type'">
  Permission Category: {{ key }}
  <li ng-repeat="x in value">
        Permission: {{ x.name }}
        Role: {{ x.role }}
  </li>
</ul>
    
  </div>
</body>
</html>
 
angular.module('app',['angular.filter'])
  .controller('MainController', function($scope) { 
    $scope.permissions = [
      {name: 'Add', type: 'Project', role:'Admin'},
      {name: 'Edit', type: 'Project', role:'Project Manager'},
      {name: 'Delete', type: 'Project', role:'Project Manager'},
      {name: 'Delete', type: 'Project', role:'Product Owner'},
      {name: 'Add', type: 'Code', role:'Developer'},
      {name: 'Edit', type: 'Code', role:'Developer'},
      {name: 'Delete', type: 'Code', role:'Developer'},
      {name: 'Delete', type: 'Code', role:'Project Lead'},
      {name: 'Add', type: 'Testing', role:'Tester'},
      {name: 'Edit', type: 'Testing', role:'Tester'},
      {name: 'Edit', type: 'Testing', role:'Test Lead'},
      {name: 'Delete', type: 'Testing', role:'Test Lead'}
    ];
 });
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers