angular.js/src/AngularPublic.js

33 lines
720 B
JavaScript
Raw Normal View History

2010-04-05 18:46:53 +00:00
var browserSingleton;
angularService('$browser', function browserFactory(){
if (!browserSingleton) {
2010-04-06 03:53:33 +00:00
browserSingleton = new Browser(window.location, window.document);
2010-04-05 18:46:53 +00:00
browserSingleton.startUrlWatcher();
2010-04-06 03:53:33 +00:00
browserSingleton.bind();
2010-04-05 18:46:53 +00:00
}
return browserSingleton;
});
extend(angular, {
'element': jqLite,
'compile': compile,
'scope': createScope,
'copy': copy,
'extend': extend,
'equals': equals,
2010-04-05 18:46:53 +00:00
'foreach': foreach,
'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
});