Application.Controllers.controller("FilesController", ["$state", FilesController]);
function FilesController($state) {
    //console.log("FileController going to projects.project.files.all");
    //$state.go('projects.project.files.all');
    var ctrl = this;

    ctrl.showSearchResults = showSearchResults;

    //////////////////
    function showSearchResults() {
        $state.go('projects.project.files.search');
    }
}

Application.Controllers.controller("FilesController", ["$state", FilesController]);
function FilesController($state) {
    var ctrl = this;

    ctrl.showSearchResults = showSearchResults;

    init();

    //////////////////
    function showSearchResults() {
        $state.go('projects.project.files.search');
    }

    function init() {
        if ($state.current.name == "projects.project.files") {
            $state.go('projects.project.files.all');
        }
    }
}

Remove console statement. Move initialization logic for controller into init() method.
Remove console statement. Move initialization logic for controller into init() method.
