var app = angular .module('kinderspruchComApp'); app.factory('APIConfig', function($rootScope) { return sharedService = {access_token:"c1ff632519dd84c43c3779e5c20d60891e4b3a8b", url: 'http://api.kinderspruch.com'}; });