forked from loneleeandroo/ngMeteor
-
Notifications
You must be signed in to change notification settings - Fork 4
/
ngMeteor.js
30 lines (26 loc) · 789 Bytes
/
ngMeteor.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Define ngMeteor and its dependencies
ngMeteor = angular.module('ngMeteor', [
'ngMeteor.collections',
'ngMeteor.template',
'ngMeteor.user',
'hashKeyCopier'
]);
// Method to allow injection of angular modules dependencies into ngMeteor
ngMeteor.injector = function (modules) {
angular.forEach(modules, function (module) {
ngMeteor.requires.push(module);
});
};
// Change the data-bindings from {{foo}} to [[foo]]
ngMeteor.config(['$interpolateProvider',
function ($interpolateProvider) {
$interpolateProvider.startSymbol('[[');
$interpolateProvider.endSymbol(']]');
}
]);
// Manual initilisation of ngMeteor
angular.element(document).ready(function () {
if (!angular.element(document).injector()) {
angular.bootstrap(document, ['ngMeteor']);
}
});