AngularJS, share data service triggered multiple times
<p>I faced with problem of multiple triggering share data service in my app and now I will try to explain it.</p>

<p>On the home page with controller 'home' user can select one of three menu items, after user has selected one of the item (for example the first one), he is redirecting to this view, with its own controller 'table'. The view has a table and tabs on the bottom, each of this tab has own controller 'tab1 and etc'. By click on row I'm sharing the id  of this row between tabs' controllers, that tabs could load content related with this particular row. For now everything works well. </p>

<p>Next, when user clicks on button home, he is redirecting to home page and if he clicks on item (for example the first one) again, the shared services will triggered twice and will return the same id twice, for third time share service will triggered 3 times and etc. </p>

<p>Below my code, I appreciate if somebody could explain me, what I'm missing. Thanks in advance.</p>

<pre><code>  app.controller('table', [
      '$scope', 'tab1ID', 'tab2ID', 'tab3ID'
        function ($scope, tab1ID, tab2ID, tab3ID) {

             $scope.rowSelection($scope, function (row) {

                    tab1ID.setId(row.id);
                    tab2ID.setId(row.id);
                    tab3ID.setId(row.id)

                });

  app.controller('tab1', [
      '$scope', 'tab1ID', dataService
        function ($scope, tab1ID, dataService) {

         tab1ID.getId().then(null, null, function (id) {

// return increment count of 'id' after redirecting from home view to table view
// dataService firing for each incremented id (1 for 1, 2 for 2 and etc)

            dataService.rowData(id)
                .then(function (res) {

                $scope.data = res;

            })
       });

  .factory(
        'tab1ID', function ($q) {

            var self = this,
                defer = $q.defer();

            this.share = '';

            return {
                getId: function () {
                    return defer.promise;
                },
                setId: function (id) {

                    self.share = id;
                    defer.notify(self.share);
                }
            }
        }
    );
</code></pre>