mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-18 07:50:22 +00:00
35 lines
810 B
JavaScript
35 lines
810 B
JavaScript
var browserSingleton;
|
|
angularService('$browser', function browserFactory(){
|
|
if (!browserSingleton) {
|
|
browserSingleton = new Browser(
|
|
window.location,
|
|
jqLite(window.document),
|
|
jqLite(window.document.getElementsByTagName('head')[0]));
|
|
browserSingleton.startUrlWatcher();
|
|
browserSingleton.bind();
|
|
}
|
|
return browserSingleton;
|
|
});
|
|
|
|
extend(angular, {
|
|
'element': jqLite,
|
|
'compile': compile,
|
|
'scope': createScope,
|
|
'copy': copy,
|
|
'extend': extend,
|
|
'equals': equals,
|
|
'foreach': foreach,
|
|
'noop':noop,
|
|
'bind':bind,
|
|
'toJson': toJson,
|
|
'fromJson': fromJson,
|
|
'identity':identity,
|
|
'isUndefined': isUndefined,
|
|
'isDefined': isDefined,
|
|
'isString': isString,
|
|
'isFunction': isFunction,
|
|
'isObject': isObject,
|
|
'isNumber': isNumber,
|
|
'isArray': isArray
|
|
});
|
|
|