// create the module and name it DESIGNfromWITHIN
  var DESIGNfromWITHIN = angular.module('DESIGNfromWITHIN', ['ngRoute', 'ngAnimate', 'ngSanitize'])
  .config(function($sceProvider) {
      // Completely disable SCE.  For demonstration purposes only!
      // Do not use in new projects.
    $sceProvider.enabled(false);
  });

  // configure our routes
  DESIGNfromWITHIN.config(function($locationProvider, $routeProvider) {
    // use the HTML5 History API
    $locationProvider
    .html5Mode(true);

    $routeProvider
    // route for the home page
    .when('/', {
      templateUrl : 'assets/templates/gulp_h5bp/pages/home.html',
      controller  : 'mainController'
    })
    // route for the test page
    .when('/test.html', {
      templateUrl : 'assets/templates/gulp_h5bp/pages/test.html',
      controller  : 'testController'
    })
    // route for the post page
    .when('/blog-webdesign-development/:[[*alias]]', {
      templateUrl : 'assets/templates/gulp_h5bp/pages/post.html',
      controller  : 'postController'
    })
    .otherwise({ 
      redirectTo: '/'
    });
  });

  // create the controller and inject Angular's $scope
  DESIGNfromWITHIN.controller('mainController', function($scope, $http) {
    $http.get('[[~2]]')
    .then(function(res){
      $scope.message = res.data;
      $scope.test = 'YES';                
    });
  });

  DESIGNfromWITHIN.controller('postController', function($scope, $http) {
    $http.get('[[~2]]')
    .then(function(res){
      $scope.message = res.data; 
      $scope.test = 'YES';               
    });
  });

  DESIGNfromWITHIN.controller('testController', function($scope, $http) {
    $http.get('http://designfromwithin.com/assets/templates/gulp_h5bp/package.json')
    .then(function(res){
      $scope.message = res.data; 
      $scope.test = 'YES';               
    });
  });