(function () {
    'use strict';

    angular
        .module('springbootangularhtml5')
        .controller('MainController', MainController);

    /** @ngInject */
    function MainController() {
        var vm = this;

    }
})();

(function () {
    'use strict';

    angular
        .module('springbootangularhtml5')
        .controller('MainController', MainController);

    /** @ngInject */
    function MainController($http, $log) {
        var vm = this;

        vm.callService = function () {
            console.log('yep');
            $http.get('api/service1').then(function (response) {
                vm.result = response;
            }, function (reason) {
                $log.error(reason);
            });
        }
    }
})();

Add an example call to show URL handling