angular.js/src/AngularPublic.js

47 lines
1.1 KiB
JavaScript
Raw Normal View History

'use strict';
2010-04-05 18:46:53 +00:00
var browserSingleton;
angularService('$browser', function($log, $sniffer) {
2010-04-05 18:46:53 +00:00
if (!browserSingleton) {
browserSingleton = new Browser(window, jqLite(window.document), jqLite(window.document.body),
XHR, $log, $sniffer);
2010-04-05 18:46:53 +00:00
}
return browserSingleton;
}, {$inject: ['$log', '$sniffer']});
2010-04-05 18:46:53 +00:00
2010-04-05 18:46:53 +00:00
extend(angular, {
// disabled for now until we agree on public name
//'annotate': annotate,
2010-04-05 18:46:53 +00:00
'compile': compile,
'scope': createScope,
'copy': copy,
'extend': extend,
'equals': equals,
'forEach': forEach,
'injector': createInjector,
2010-04-05 18:46:53 +00:00
'noop':noop,
2010-04-15 21:17:33 +00:00
'bind':bind,
'toJson': toJson,
'fromJson': fromJson,
2010-04-05 18:46:53 +00:00
'identity':identity,
'isUndefined': isUndefined,
'isDefined': isDefined,
'isString': isString,
'isFunction': isFunction,
2010-05-07 19:09:14 +00:00
'isObject': isObject,
2010-04-05 18:46:53 +00:00
'isNumber': isNumber,
'isArray': isArray,
'version': version,
'isDate': isDate,
'lowercase': lowercase,
'uppercase': uppercase
2010-04-05 18:46:53 +00:00
});
//try to bind to jquery now so that one can write angular.element().read()
//but we will rebind on bootstrap again.
bindJQuery();