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: 
You're giving "username" as `username`, which does not exist. You need to pass a username that exists (postgres would probably do).  

add parameters `--username=postgres --password` and it will ask you for the password for user postgres. (you might have security set to trust in your pg\_hba.conf in which case leaving out --password would work.
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)