Edit in JSFiddle

var APP = angular.module('APP', []);

APP.ApplicationCtrl = function ($scope, User) {

    $scope.getHelloMessage = function () {
        return User.sayHello();
    };

};

APP.provider('User', function () {

    this._username = '';

    this.$get = function () {
        var that = this;
        return {
            sayHello: function () {
                return 'Hello, ' + that._username;
            }
        };
    };

});

APP.config(function (UserProvider) {
    UserProvider._username = 'mrzepinski from config';
});
<div ng-app="APP" ng-controller="APP.ApplicationCtrl">
     <h1>{{ getHelloMessage() }}</h1>
</div>