AngularJS - multiple class ng-class

Have multiple conditions within the ng-class object

by nisham

HTML

<div ng-app="app">
    <div ng-controller="Controller1">
      <ul>
          controller 1
     </ul
     </div>
        <div ng-controller="Controller2">
      <ul>
            <li >
                controllert 2 section  {{lists}}
            </li>
     </ul
     </div>
</div>

JavaScript

var app = angular.module('app', []);

app.controller('Controller1', function($scope, shareDataService) {
    $scope.someData="i am from controoler 1";
    
        shareDataService.addList($scope.someData);
  
});

app.controller('Controller2', function($scope, shareDataService) {
    $scope.lists = shareDataService.getList();
});


app.service('shareDataService', function() {
  var myList = [];

  var addList = function(newObj) {
      myList.push(newObj);
  }

  var getList = function(){
      return myList;
  }

  return {
    addList: addList,
    getList: getList
  };

});