lib/generators/angularjs/install/templates/routes.js.erb in angularjs_scaffold-0.0.19 vs lib/generators/angularjs/install/templates/routes.js.erb in angularjs_scaffold-0.0.22

- old
+ new

@@ -1,16 +1,23 @@ -var angapp = angular.module('angapp', ['ngCookies']). - config(function($routeProvider, $locationProvider) { - //$locationProvider.hashPrefix(''); - $locationProvider.html5Mode(true); - $routeProvider. - when('/', {controller: 'WelcomeCtrl', - templateUrl:'<%= asset_path("welcome/index.html") %>'}). - otherwise({redirectTo:'/'}); -}); +// Generated by CoffeeScript 1.4.0 +(function() { + var angular, root, thisApp; -function CsrfCtrl($cookieStore){ - $cookieStore.put("XSRF-TOKEN", - angular.element(document.getElementById('csrf')). - attr('data-csrf')); -} + root = typeof global !== "undefined" && global !== null ? global : window; + angular = root.angular; + + thisApp = angular.module("Client", ['ngCookies']).config([ + '$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { + $locationProvider.html5Mode(true); + return $routeProvider.when("/", { + controller: "WelcomeCtrl", + templateUrl: "<%= asset_path('welcome/index.html') %>" + }).otherwise({ + redirectTo: "/" + }); + } + ]); + + root.thisApp = thisApp; + +}).call(this);