1
- //Load angular hint modules
1
+ // Load angular hint modules
2
2
require ( 'angular-hint-dom' ) ;
3
3
require ( 'angular-hint-directives' ) ;
4
4
5
- //List of all possible modules
6
- //The default ng-hint behavior loads all modules
5
+ // List of all possible modules
6
+ // The default ng-hint behavior loads all modules
7
7
var allModules = [ 'ngHintDirectives' , 'ngHintDom' ] ;
8
8
9
- //Determine whether this run is by protractor.
10
- //If protractor is running, the bootstrap will already be deferred.
11
- //In this case resumeBootstrap should be patched to load the hint modules.
12
- var isTest = false ;
13
- if ( window . name === 'NG_DEFER_BOOTSTRAP!' ) {
14
- isTest = true ;
9
+ // Determine whether this run is by protractor.
10
+ // If protractor is running, the bootstrap will already be deferred.
11
+ // In this case `resumeBootstrap` should be patched to load the hint modules.
12
+ if ( window . name === 'NG_DEFER_BOOTSTRAP!' ) {
15
13
var originalResumeBootstrap ;
16
14
Object . defineProperty ( angular , 'resumeBootstrap' , {
17
15
get : function ( ) {
18
16
return function ( modules ) {
19
- return ( originalResumeBootstrap . call ( angular , modules . concat ( loadModules ( ) ) ) ) ;
20
- }
17
+ return originalResumeBootstrap . call ( angular , modules . concat ( loadModules ( ) ) ) ;
18
+ } ;
21
19
} ,
22
20
set : function ( resumeBootstrap ) {
23
21
originalResumeBootstrap = resumeBootstrap ;
24
-
25
22
}
26
23
} ) ;
27
24
}
@@ -54,7 +51,7 @@ function loadModules() {
54
51
modules = allModules ;
55
52
}
56
53
return modules ;
57
- } ;
54
+ }
58
55
59
56
function excludeModules ( modulesToExclude ) {
60
57
modulesToExclude = modulesToExclude . map ( hintModuleName ) ;
@@ -71,6 +68,6 @@ function hintModuleName(name) {
71
68
return 'ngHint' + title ( name ) ;
72
69
}
73
70
74
- function title ( str ) {
71
+ function title ( str ) {
75
72
return str [ 0 ] . toUpperCase ( ) + str . substr ( 1 ) ;
76
73
}
0 commit comments