var sampleProjects = [
    
];

var requestSampleProjects = function(){
    var updateSampleProjectsInUI = function(sampleProjects){
        var baseScope = angular.element($("#baseController")).scope()
        baseScope.safeApply(function(){
            baseScope.sampleProjects = sampleProjects
        })
    }
    universalDataApi.getJSONDataPromise("http://www.maps-geolayers.de/Sample_Projects/sampleProjects.json", "json").then(function(newSampleProjects){
        sampleProjects = newSampleProjects;
        universalDataApi.getJSONDataPromise("http://www.maps-geolayers.de/Sample_Projects/versionedSampleProjects.json", "json").then(function(newSampleProjects){
            sampleProjects = newSampleProjects.concat(sampleProjects);
            updateSampleProjectsInUI(sampleProjects)
        }).catch(function(err){
            console.log(err)
        })
        updateSampleProjectsInUI(sampleProjects)
    }).catch(function(err){
        console.log(err)
    })
}