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: 
Try this way, it works!!

```
$ pg_dump -h localhost -U postgres -Fc mydb > db.dump

```
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.