From 188539d4fe56431ee06fd9a7e02b44eaa81153df Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Tue, 3 Dec 2013 17:36:13 -0500 Subject: [PATCH] Removed angular.js related files which are no longer used --- public/js/app.js | 25 ------------------------- public/js/controllers.js | 30 ------------------------------ public/js/directives.js | 11 ----------- public/js/filters.js | 10 ---------- public/js/main.js | 2 -- public/js/services.js | 9 --------- views/partials/partial1.jade | 3 --- views/partials/partial2.jade | 6 ------ 8 files changed, 96 deletions(-) delete mode 100755 public/js/app.js delete mode 100755 public/js/controllers.js delete mode 100755 public/js/directives.js delete mode 100755 public/js/filters.js delete mode 100644 public/js/main.js delete mode 100755 public/js/services.js delete mode 100644 views/partials/partial1.jade delete mode 100644 views/partials/partial2.jade diff --git a/public/js/app.js b/public/js/app.js deleted file mode 100755 index 29c8010f7b..0000000000 --- a/public/js/app.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - - -// Declare app level module which depends on filters, and services -angular.module('myApp', ['ngRoute', 'myApp.filters', 'myApp.services', 'myApp.directives']). - config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { - $routeProvider.when('/view1', { - templateUrl: 'partials/partial1', - controller: MyCtrl1 - }); - $routeProvider.when('/view2', { - templateUrl: 'partials/partial2', - controller: MyCtrl2 - }); - $routeProvider.when('/login', { - templateUrl: 'partials/login', - controller: MyCtrl3 - }); - - $routeProvider.when('/logout', { - controller: MyCtrl4 - }); - $routeProvider.otherwise({ redirectTo: '/view1' }); - $locationProvider.html5Mode(true); - }]); \ No newline at end of file diff --git a/public/js/controllers.js b/public/js/controllers.js deleted file mode 100755 index 5d8f71892d..0000000000 --- a/public/js/controllers.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -/* Controllers */ - -function AppCtrl($scope, $http) { - $http({method: 'GET', url: '/api/name'}). - success(function(data, status, headers, config) { - $scope.name = data.name; - }). - error(function(data, status, headers, config) { - $scope.name = 'Error!'; - }); -} - -function MyCtrl1() {} -MyCtrl1.$inject = []; - - -function MyCtrl2() { -} -MyCtrl2.$inject = []; - -function MyCtrl3() {} -MyCtrl3.$inject = []; - - -function MyCtrl4($scope, $http) { - $http({ method: 'GET', url: '/logout' }); -} -MyCtrl4.$inject = []; diff --git a/public/js/directives.js b/public/js/directives.js deleted file mode 100755 index 9fc16cc4cb..0000000000 --- a/public/js/directives.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -/* Directives */ - - -angular.module('myApp.directives', []). - directive('appVersion', ['version', function(version) { - return function(scope, elm, attrs) { - elm.text(version); - }; - }]); diff --git a/public/js/filters.js b/public/js/filters.js deleted file mode 100755 index 259dd4ee02..0000000000 --- a/public/js/filters.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -/* Filters */ - -angular.module('myApp.filters', []). - filter('interpolate', ['version', function(version) { - return function(text) { - return String(text).replace(/\%VERSION\%/mg, version); - } - }]); diff --git a/public/js/main.js b/public/js/main.js deleted file mode 100644 index 9914b451aa..0000000000 --- a/public/js/main.js +++ /dev/null @@ -1,2 +0,0 @@ -/* global $ */ - diff --git a/public/js/services.js b/public/js/services.js deleted file mode 100755 index 334d543f13..0000000000 --- a/public/js/services.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/* Services */ - - -// Demonstrate how to register services -// In this case it is a simple value service. -angular.module('myApp.services', []). - value('version', '0.1'); diff --git a/views/partials/partial1.jade b/views/partials/partial1.jade deleted file mode 100644 index 9e4e76c00b..0000000000 --- a/views/partials/partial1.jade +++ /dev/null @@ -1,3 +0,0 @@ -.row - .col-lg-12 - p This is the partial for view 1. \ No newline at end of file diff --git a/views/partials/partial2.jade b/views/partials/partial2.jade deleted file mode 100644 index ef931cb0bf..0000000000 --- a/views/partials/partial2.jade +++ /dev/null @@ -1,6 +0,0 @@ -.row - .col-lg-12 - p This is the partial for view 2. - p - | Showing of 'interpolate' filter: - | {{ 'Current version is v%VERSION%.' | interpolate }} \ No newline at end of file