Removed angular.js related files which are no longer used
This commit is contained in:
@ -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);
|
|
||||||
}]);
|
|
@ -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 = [];
|
|
@ -1,11 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
/* Directives */
|
|
||||||
|
|
||||||
|
|
||||||
angular.module('myApp.directives', []).
|
|
||||||
directive('appVersion', ['version', function(version) {
|
|
||||||
return function(scope, elm, attrs) {
|
|
||||||
elm.text(version);
|
|
||||||
};
|
|
||||||
}]);
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}]);
|
|
@ -1,2 +0,0 @@
|
|||||||
/* global $ */
|
|
||||||
|
|
@ -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');
|
|
@ -1,3 +0,0 @@
|
|||||||
.row
|
|
||||||
.col-lg-12
|
|
||||||
p This is the partial for view 1.
|
|
@ -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 }}
|
|
Reference in New Issue
Block a user