-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e8347cc
commit 0c81b2d
Showing
19 changed files
with
861 additions
and
798 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
(function (window, angular, undefined) { | ||
'use strict'; | ||
'use strict'; | ||
angular.module('adb', [ | ||
'ngRoute', | ||
'adb.routing', | ||
'angular-debug-bar', | ||
'adb.controllers' | ||
]).config(appConfig); | ||
|
||
angular.module('adb', [ | ||
'ngRoute', | ||
'adb.routing', | ||
'angular-debug-bar', | ||
'adb.controllers' | ||
]).config(['debugBarProvider', function (debugBarProvider) { | ||
// change interval | ||
debugBarProvider.setRefreshInterval(2000); | ||
appConfig.$inject = ['debugBarProvider']; | ||
|
||
// clear all default plugins | ||
debugBarProvider.clearDefaultPlugins(); | ||
function appConfig (debugBarProvider) { | ||
debugBarProvider.setRefreshInterval(2000); | ||
debugBarProvider.clearDefaultPlugins(); | ||
debugBarProvider.registerPlugin('numberOfRequests', numberOfRequests, { | ||
label: 'Number of requests' | ||
}); | ||
} | ||
|
||
// register only one custom plugin | ||
debugBarProvider.registerPlugin('numberOfRequests', function () { | ||
if ('getEntriesByType' in window.performance) { | ||
return window.performance.getEntriesByType('resource').length | ||
} | ||
return 'N/A'; | ||
}, { | ||
label: 'Number of requests' | ||
}); | ||
}]); | ||
|
||
}(window, window.angular)); | ||
function numberOfRequests () { | ||
if ('getEntriesByType' in window.performance) { | ||
return window.performance.getEntriesByType('resource').length | ||
} | ||
return 'N/A'; | ||
} | ||
}(window, window.angular)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
(function (angular, undefined) { | ||
'use strict'; | ||
|
||
angular.module('adb.controllers', []); | ||
|
||
}(window.angular)); | ||
'use strict'; | ||
angular.module('adb.controllers', []); | ||
}(window.angular)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
(function (angular, undefined) { | ||
'use strict'; | ||
'use strict'; | ||
angular.module('adb.controllers') | ||
.controller('HomeCtrl', HomeCtrl); | ||
|
||
angular.module('adb.controllers').controller('HomeCtrl', ['$scope', function ($scope) {}]); | ||
HomeCtrl.$inject = ['$scope']; | ||
|
||
}(window.angular)); | ||
function HomeCtrl ($scope) {} | ||
}(window.angular)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
(function (angular, undefined) { | ||
'use strict'; | ||
'use strict'; | ||
angular.module('adb.routing', []) | ||
.config(routeConfig); | ||
|
||
angular.module('adb.routing', []).config(['$routeProvider', function ($routeProvider) { | ||
routeConfig.$inject = ['$routeProvider']; | ||
|
||
$routeProvider | ||
.when('/home', { | ||
templateUrl: 'app/home/home.html', | ||
controller: 'HomeCtrl' | ||
}) | ||
.when('/test', { | ||
templateUrl: 'app/test/test.html', | ||
controller: 'TestCtrl' | ||
}) | ||
.otherwise({ | ||
redirectTo: '/home' | ||
}); | ||
|
||
}]); | ||
|
||
}(window.angular)); | ||
function routeConfig ($routeProvider) { | ||
$routeProvider.when('/home', { | ||
templateUrl: 'app/home/home.html', | ||
controller: 'HomeCtrl' | ||
}); | ||
$routeProvider.when('/test', { | ||
templateUrl: 'app/test/test.html', | ||
controller: 'TestCtrl' | ||
}); | ||
$routeProvider.otherwise({ | ||
redirectTo: '/home' | ||
}); | ||
} | ||
}(window.angular)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
(function (angular, undefined) { | ||
'use strict'; | ||
'use strict'; | ||
angular.module('adb.controllers') | ||
.controller('TestCtrl', TestCtrl); | ||
|
||
angular.module('adb.controllers').controller('TestCtrl', ['$scope', function ($scope) { | ||
TestCtrl.$inject = ['TestCtrl']; | ||
|
||
$scope.books = [ | ||
{ | ||
title: 'ng-book', | ||
authors: [ | ||
{ | ||
name: 'Ari Lerner' | ||
} | ||
] | ||
}, | ||
{ | ||
title: 'AngularJS', | ||
authors: [ | ||
{ | ||
name: 'Brad Green' | ||
}, | ||
{ | ||
name: 'Shyam Seshadri' | ||
} | ||
] | ||
} | ||
]; | ||
|
||
}]); | ||
|
||
}(window.angular)); | ||
function TestCtrl ($scope) { | ||
$scope.books = [ | ||
{ | ||
title: 'ng-book', | ||
authors: [ | ||
{ | ||
name: 'Ari Lerner' | ||
} | ||
] | ||
}, | ||
{ | ||
title: 'AngularJS', | ||
authors: [ | ||
{ | ||
name: 'Brad Green' | ||
}, | ||
{ | ||
name: 'Shyam Seshadri' | ||
} | ||
] | ||
} | ||
]; | ||
} | ||
}(window.angular)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>AngularJS Debug Bar</title> | ||
<meta charset="utf-8" /> | ||
<head> | ||
<title>AngularJS Debug Bar</title> | ||
<meta charset="utf-8"/> | ||
|
||
<!-- CSS --> | ||
<link rel="stylesheet" href="../dist/css/angular-debug-bar.css" /> | ||
<!-- CSS --> | ||
<link rel="stylesheet" href="../dist/css/angular-debug-bar.min.css"/> | ||
|
||
<!-- JS --> | ||
<script type="text/javascript" src="bower_components/angular/angular.js"></script> | ||
<script type="text/javascript" src="bower_components/angular-route/angular-route.js"></script> | ||
<script type="text/javascript" src="../dist/js/angular-debug-bar.js"></script> | ||
<script type="text/javascript" src="app/routing.js"></script> | ||
<script type="text/javascript" src="app/controllers.js"></script> | ||
<script type="text/javascript" src="app/home/HomeCtrl.js"></script> | ||
<script type="text/javascript" src="app/test/TestCtrl.js"></script> | ||
<script type="text/javascript" src="app/bootstrap.js"></script> | ||
</head> | ||
<body ng-app="adb"> | ||
<h1>AngularJS Debug Bar</h1> | ||
<!-- JS --> | ||
<script type="text/javascript" src="bower_components/angular/angular.js"></script> | ||
<script type="text/javascript" src="bower_components/angular-route/angular-route.js"></script> | ||
<script type="text/javascript" src="../dist/js/angular-debug-bar.min.js"></script> | ||
<script type="text/javascript" src="app/routing.js"></script> | ||
<script type="text/javascript" src="app/controllers.js"></script> | ||
<script type="text/javascript" src="app/home/HomeCtrl.js"></script> | ||
<script type="text/javascript" src="app/test/TestCtrl.js"></script> | ||
<script type="text/javascript" src="app/bootstrap.js"></script> | ||
</head> | ||
<body ng-app="adb"> | ||
<h1>AngularJS Debug Bar</h1> | ||
|
||
<ul> | ||
<li><a href="#/home">Home</a></li> | ||
<li><a href="#/test">Test page to see as values changes</a></li> | ||
</ul> | ||
<ul> | ||
<li><a href="#/home">Home</a></li> | ||
<li><a href="#/test">Test page to see as values changes</a></li> | ||
</ul> | ||
|
||
<ng-view></ng-view> | ||
<ng-view></ng-view> | ||
|
||
<angular-debug-bar></angular-debug-bar> | ||
</body> | ||
</html> | ||
<angular-debug-bar></angular-debug-bar> | ||
</body> | ||
</html> |
Oops, something went wrong.