File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ Many of my styles have been from the many pair programming sessions [Ward Bell](
32
32
1 . [ Angular $ Wrapper Services] ( #angular-$-wrapper-services )
33
33
1 . [ Comments] ( #comments )
34
34
1 . [ JSHint] ( #js-hint )
35
+ 1 . [ Constants] ( #constants )
35
36
1 . [ Angular Docs] ( #angular-docs )
36
37
1 . [ Contributing] ( #contributing )
37
38
1 . [ License] ( #license )
@@ -1086,6 +1087,29 @@ TODO
1086
1087
1087
1088
**[Back to top](#table-of-contents)**
1088
1089
1090
+ ## Constants
1091
+ For anything else, API reference, check the [Angular documentation](//docs.angularjs.org/api).
1092
+
1093
+ - **Vendor Globals**: Create an AngularJS Constant for vendor libraries' global variables.
1094
+
1095
+ *Why?*: Provides a way to inject vendor libraries that otherwise are globals.
1096
+
1097
+ ` ` ` javascript
1098
+ // constants.js
1099
+
1100
+ /* global toastr:false, moment:false */
1101
+ (function () {
1102
+ ' use strict' ;
1103
+
1104
+ angular
1105
+ .module (' app.core' )
1106
+ .constant (' toastr' , toastr)
1107
+ .constant (' moment' , moment);
1108
+ })();
1109
+ ` ` `
1110
+
1111
+ **[Back to top](#table-of-contents)**
1112
+
1089
1113
## AngularJS docs
1090
1114
For anything else, API reference, check the [Angular documentation](//docs.angularjs.org/api).
1091
1115
You can’t perform that action at this time.
0 commit comments