Question: I have created the service but i am not getting how use this service in my controller.

```
(function(){
    'use.strict';

    angular
     .module('app.core')
     .factory('shareBtwnCtrlr', shareBtwnCtrlrService);

    /** @ngInject */
    function shareBtwnCtrlrService() {
        shareBtwnCtrlr = function($scope, $rootScope){
            $scope.value = $rootScope.test;
        }
        return shareBtwnCtrlr;
    }
})();

```

In the above code $rootScope.test is coming from one controller and now i have to use this $scope.value in another controller using this service. The another controller is like below

```
(function (){
    'use strict';

    angular.module('app.product')
        .controller('ProductController', ProductController);

    /** @ngInject */
    //ProductController.$inject = ['$http', '$location', '$scope'];
    function ProductController($http, $location, $rootScope, $scope, $localStorage, $interval, $timeout,$mdDialog, $document, shareBtwnCtrlr){
        var vm = this;  
     }
})();

```

Answer: 
If someone has the same problem using intellij, here is what helped me: 
In my case the Problem was, that i right clicked the datasource, but you have to open it and right click the database itself. So in the image below don't click on localDB. Right click the database name and then do a dump. 

Hope this will help someone to solve this confusing UX problem. :D

[![enter image description here](https://i.stack.imgur.com/fpC1L.png)](https://i.stack.imgur.com/fpC1L.png)
I was having the same problem but after trying out different permutations of the command options while referencing the documentation, I was able to get it running with this order of options. The command I used is: 

```
pg_dump.exe -h localhost -U postgres -t "shop*" -t "core*" -t "profiles*" -f "path/to/output/dir_or_file" mydbname

```

### Where:

| option prefix | option | params |
| --- | --- | --- |
| -h | host | localhost |
| -U | username | postgres |
| -t | Tables | *Any tables whose name starts with (shop, core, or profiles (NOTE: for django app tables in my case))* |
| -f | file out | *path where I want to save the dumped file* |
| (End of cmd) | database | mydbname |

Note: as I have multiple versions of postgresql on my computer, I had to call the newest pg\_dump executable. (Just for reference)