aboutsummaryrefslogtreecommitdiffstats
path: root/src/service
diff options
context:
space:
mode:
Diffstat (limited to 'src/service')
-rw-r--r--src/service/cookies.js2
-rw-r--r--src/service/formFactory.js24
-rw-r--r--src/service/log.js2
-rw-r--r--src/service/resource.js4
-rw-r--r--src/service/route.js2
-rw-r--r--src/service/routeParams.js2
-rw-r--r--src/service/xhr.bulk.js2
-rw-r--r--src/service/xhr.js2
8 files changed, 20 insertions, 20 deletions
diff --git a/src/service/cookies.js b/src/service/cookies.js
index 220a6ed5..c02fd8a8 100644
--- a/src/service/cookies.js
+++ b/src/service/cookies.js
@@ -45,7 +45,7 @@ angularServiceInject('$cookies', function($browser) {
/**
* Pushes all the cookies from the service to the browser and verifies if all cookies were stored.
*/
- function push(){
+ function push() {
var name,
value,
browserCookies,
diff --git a/src/service/formFactory.js b/src/service/formFactory.js
index 4fc53935..1efbe363 100644
--- a/src/service/formFactory.js
+++ b/src/service/formFactory.js
@@ -25,7 +25,7 @@
<doc:example>
<doc:source>
<script>
- function EditorCntl(){
+ function EditorCntl() {
this.html = '<b>Hello</b> <i>World</i>!';
}
@@ -33,7 +33,7 @@
var self = this;
var htmlFilter = angular.filter('html');
- this.$parseModel = function(){
+ this.$parseModel = function() {
// need to protect for script injection
try {
this.$viewValue = htmlFilter(this.$modelValue || '').get();
@@ -47,18 +47,18 @@
}
}
- this.$render = function(){
+ this.$render = function() {
element.html(this.$viewValue);
}
- element.bind('keyup', function(){
- self.$apply(function(){
+ element.bind('keyup', function() {
+ self.$apply(function() {
self.$emit('$viewChange', element.html());
});
});
}
- angular.directive('ng:contenteditable', function(){
+ angular.directive('ng:contenteditable', function() {
function linkFn($formFactory, element) {
var exp = element.attr('ng:contenteditable'),
form = $formFactory.forElement(element),
@@ -70,7 +70,7 @@
controller: HTMLEditorWidget,
controllerArgs: [element]});
// if the element is destroyed, then we need to notify the form.
- element.bind('$destroy', function(){
+ element.bind('$destroy', function() {
widget.$destroy();
});
}
@@ -88,7 +88,7 @@
</form>
</doc:source>
<doc:scenario>
- it('should enter invalid HTML', function(){
+ it('should enter invalid HTML', function() {
expect(element('form[name=editorForm]').prop('className')).toMatch(/ng-valid/);
input('html').enter('<');
expect(element('form[name=editorForm]').prop('className')).toMatch(/ng-invalid/);
@@ -96,7 +96,7 @@
</doc:scenario>
</doc:example>
*/
-angularServiceInject('$formFactory', function(){
+angularServiceInject('$formFactory', function() {
/**
@@ -123,7 +123,7 @@ angularServiceInject('$formFactory', function(){
* {@link angular.widget.form form} element.
* @param {Element} element The element where the search for form should initiate.
*/
- formFactory.forElement = function (element) {
+ formFactory.forElement = function(element) {
return element.inheritedData('$form') || formFactory.rootForm;
};
return formFactory;
@@ -225,7 +225,7 @@ function propertiesUpdate(widget) {
* @param {*} viewValue The new value for the view which will be assigned to `widget.$viewValue`.
*/
-function FormController(){
+function FormController() {
var form = this,
$error = form.$error = {};
@@ -361,7 +361,7 @@ FormController.prototype.$createWidget = function(params) {
// Set the state to something we know will change to get the process going.
widget.$modelValue = Number.NaN;
// watch for scope changes and update the view appropriately
- modelScope.$watch(scopeGet, function (scope, value) {
+ modelScope.$watch(scopeGet, function(scope, value) {
if (!equals(widget.$modelValue, value)) {
widget.$modelValue = value;
widget.$parseModel ? widget.$parseModel() : (widget.$viewValue = value);
diff --git a/src/service/log.js b/src/service/log.js
index 3dacd117..01254178 100644
--- a/src/service/log.js
+++ b/src/service/log.js
@@ -87,7 +87,7 @@ angularServiceInject("$log", $logFactory = function($window){
var console = $window.console || {};
var logFn = console[type] || console.log || noop;
if (logFn.apply) {
- return function(){
+ return function() {
var args = [];
forEach(arguments, function(arg){
args.push(formatError(arg));
diff --git a/src/service/resource.js b/src/service/resource.js
index 915f2d92..27bb1632 100644
--- a/src/service/resource.js
+++ b/src/service/resource.js
@@ -65,7 +65,7 @@
* update, delete) on server-side data like this:
* <pre>
var User = $resource('/user/:userId', {userId:'@id'});
- var user = User.get({userId:123}, function(){
+ var user = User.get({userId:123}, function() {
user.abc = true;
user.$save();
});
@@ -136,7 +136,7 @@
<pre>
var User = $resource('/user/:userId', {userId:'@id'});
- var user = User.get({userId:123}, function(){
+ var user = User.get({userId:123}, function() {
user.abc = true;
user.$save();
});
diff --git a/src/service/route.js b/src/service/route.js
index b78cca91..f5c8a672 100644
--- a/src/service/route.js
+++ b/src/service/route.js
@@ -188,7 +188,7 @@ angularServiceInject('$route', function($location, $routeParams) {
* @description
* Adds a new route definition to the `$route` service.
*/
- when: function (path, route) {
+ when: function(path, route) {
var routeDef = routes[path];
if (!routeDef) routeDef = routes[path] = {reloadOnSearch: true};
if (route) extend(routeDef, route); // TODO(im): what the heck? merge two route definitions?
diff --git a/src/service/routeParams.js b/src/service/routeParams.js
index d9bfa61a..ac496ec7 100644
--- a/src/service/routeParams.js
+++ b/src/service/routeParams.js
@@ -26,6 +26,6 @@
* $routeParams ==> {chapterId:1, sectionId:2, search:'moby'}
* </pre>
*/
-angularService('$routeParams', function(){
+angularService('$routeParams', function() {
return {};
});
diff --git a/src/service/xhr.bulk.js b/src/service/xhr.bulk.js
index 2365be77..db560556 100644
--- a/src/service/xhr.bulk.js
+++ b/src/service/xhr.bulk.js
@@ -83,6 +83,6 @@ angularServiceInject('$xhr.bulk', function($xhr, $error, $log){
}
});
};
- this.$watch(function(){ bulkXHR.flush(); });
+ this.$watch(function() { bulkXHR.flush(); });
return bulkXHR;
}, ['$xhr', '$xhr.error', '$log']);
diff --git a/src/service/xhr.js b/src/service/xhr.js
index 4981c078..8a50964b 100644
--- a/src/service/xhr.js
+++ b/src/service/xhr.js
@@ -205,7 +205,7 @@ angularServiceInject('$xhr', function($browser, $error, $log){
response = fromJson(response, true);
}
}
- rootScope.$apply(function(){
+ rootScope.$apply(function() {
if (200 <= code && code < 300) {
success(code, response);
} else if (isFunction(error)) {