angular.module(PKG.name+'.services')
  .service('myAlert', function(){
    var __list = [];
    function alert(item) {
      if (angular.isObject(item) && Object.keys(item).length) {
        if (__list.length > 0 && __list[__list.length - 1].content === item.content && __list[__list.length-1].title === item.title) {
          __list[__list.length - 1].count++;
        } else {
          __list.push({
            content: item.content,
            title: item.title,
            count: 1
          });
        }
      }
    }

    alert['clear'] = function() {
      __list = [];
    };

    alert['isEmpty'] = function() {
      return __list.length === 0;
    };

    alert['getAlerts'] = function() {
      return __list;
    };

    alert['count'] = function() {
      return __list.length;
    };

    alert['remove'] = function(item) {
      __list.splice(__list.indexOf(item), 1);
    };

    return alert;
  });

@@ -216,33 +216,17 @@
  __list%5B
-__list.length - 1
+0
 %5D.conten
@@ -258,23 +258,9 @@
 ist%5B
-__list.length-1
+0
 %5D.ti
@@ -364,12 +364,15 @@
 ist.
-push
+unshift
 (%7B%0A 

change order to latest error on top