/*
	Logic Solution
	WeeeCarbonFootprint
	Account
*/

if(typeof window.components === "undefined") { window.components = []; }

window.components.push('ngRoute');
window.components.push('ngResource');
window.components.push('Account.Config');

angular.module('Account', window.components);

angular.module('Account')
    .config(function ($locationProvider, $routeProvider, CONSTANTS) {
        $routeProvider
			.when('/:Order', {
			    templateUrl: function (routeParams) {
			        return CONSTANTS.PAB + routeParams.Order;
			    },
			    controller: 'AccountCtrl'
			})
			.otherwise({ redirectTo: CONSTANTS.PB + '-NotFound' });
    })
	.factory('LogicService', ['$resource', function ($resource) {
		console.log('Account.js', $scope.baseUrl);
	    return {
			Login: $resource($scope.baseUrl+'/api/Login/:id', { id: '@id' }, {
	            post: { method: 'POST', isArray: true }
	        })
	    }
	}])
    .controller('MainCtrl', ['$scope', function($scope) {

    }])