aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng
diff options
context:
space:
mode:
authorIgor Minar2012-04-10 14:29:49 -0700
committerIgor Minar2012-04-10 16:52:12 -0700
commit52ee1ab5eb0f3197453b26c60a70239ac3fffea7 (patch)
tree2c4dc57ec34d4fbc08248d72daf403bc36421f46 /src/ng
parentfcc556df3745d4c7768e235cb5f1caf70eb34639 (diff)
downloadangular.js-52ee1ab5eb0f3197453b26c60a70239ac3fffea7.tar.bz2
chore(*): remove dead code and fix code style issues
Diffstat (limited to 'src/ng')
-rw-r--r--src/ng/browser.js2
-rw-r--r--src/ng/compiler.js2
-rw-r--r--src/ng/directive/booleanAttrs.js4
-rw-r--r--src/ng/directive/directives.js2
-rw-r--r--src/ng/directive/form.js2
-rw-r--r--src/ng/directive/input.js6
-rw-r--r--src/ng/directive/ngInclude.js2
-rw-r--r--src/ng/directive/select.js2
-rw-r--r--src/ng/filter/filters.js4
-rw-r--r--src/ng/httpBackend.js4
-rw-r--r--src/ng/location.js2
-rw-r--r--src/ng/parse.js24
-rw-r--r--src/ng/rootScope.js2
-rw-r--r--src/ng/sanitize.js2
14 files changed, 21 insertions, 39 deletions
diff --git a/src/ng/browser.js b/src/ng/browser.js
index 465114c5..fe14a3d7 100644
--- a/src/ng/browser.js
+++ b/src/ng/browser.js
@@ -249,7 +249,7 @@ function Browser(window, document, body, $log, $sniffer) {
* @returns {Object} Hash of all cookies (if called without any parameter)
*/
self.cookies = function(name, value) {
- var cookieLength, cookieArray, cookie, i, keyValue, index;
+ var cookieLength, cookieArray, cookie, i, index;
if (name) {
if (value === undefined) {
diff --git a/src/ng/compiler.js b/src/ng/compiler.js
index 912b068a..e4491723 100644
--- a/src/ng/compiler.js
+++ b/src/ng/compiler.js
@@ -446,7 +446,7 @@ function $CompileProvider($provide) {
if (isBooleanAttr(node, nName)) {
attrs[nName] = true; // presence means true
}
- addAttrInterpolateDirective(node, directives, value, nName)
+ addAttrInterpolateDirective(node, directives, value, nName);
addDirective(directives, nName, 'A', maxPriority);
}
}
diff --git a/src/ng/directive/booleanAttrs.js b/src/ng/directive/booleanAttrs.js
index c9f286fb..e25b259c 100644
--- a/src/ng/directive/booleanAttrs.js
+++ b/src/ng/directive/booleanAttrs.js
@@ -282,7 +282,7 @@ forEach(BOOLEAN_ATTR, function(propName, attrName) {
ngAttributeAliasDirectives[normalized] = function() {
return {
priority: 100,
- compile: function(tpl, attr) {
+ compile: function() {
return function(scope, element, attr) {
attr.$$observers[attrName] = [];
scope.$watch(attr[normalized], function(value) {
@@ -301,7 +301,7 @@ forEach(['src', 'href'], function(attrName) {
ngAttributeAliasDirectives[normalized] = function() {
return {
priority: 99, // it needs to run after the attributes are interpolated
- compile: function(tpl, attr) {
+ compile: function() {
return function(scope, element, attr) {
var value = attr[normalized];
if (value == undefined) {
diff --git a/src/ng/directive/directives.js b/src/ng/directive/directives.js
index 123645f9..aa316533 100644
--- a/src/ng/directive/directives.js
+++ b/src/ng/directive/directives.js
@@ -8,4 +8,4 @@ function ngDirective(directive) {
}
directive.restrict = directive.restrict || 'AC';
return valueFn(directive);
-};
+}
diff --git a/src/ng/directive/form.js b/src/ng/directive/form.js
index ecb47ebe..5f1cc1d2 100644
--- a/src/ng/directive/form.js
+++ b/src/ng/directive/form.js
@@ -6,7 +6,7 @@ var nullFormCtrl = {
$removeControl: noop,
$setValidity: noop,
$setDirty: noop
-}
+};
/**
* @ngdoc object
diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js
index 6366f901..250a4520 100644
--- a/src/ng/directive/input.js
+++ b/src/ng/directive/input.js
@@ -477,7 +477,7 @@ function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
ctrl.$parsers.push(maxLengthValidator);
ctrl.$formatters.push(maxLengthValidator);
}
-};
+}
function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
textInputType(scope, element, attr, ctrl, $sniffer, $browser);
@@ -584,7 +584,7 @@ function radioInputType(scope, element, attr, ctrl) {
scope.$apply(function() {
ctrl.$setViewValue(attr.value);
});
- };
+ }
});
ctrl.$render = function() {
@@ -840,7 +840,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel', '$e
this.$invalid = false;
}
} else {
- toggleValidCss(false)
+ toggleValidCss(false);
this.$invalid = true;
this.$valid = false;
invalidCount++;
diff --git a/src/ng/directive/ngInclude.js b/src/ng/directive/ngInclude.js
index 13a090a4..9796b4e1 100644
--- a/src/ng/directive/ngInclude.js
+++ b/src/ng/directive/ngInclude.js
@@ -82,7 +82,7 @@ var ngIncludeDirective = ['$http', '$templateCache', '$anchorScroll', '$compile'
onloadExp = attr.onload || '',
autoScrollExp = attr.autoscroll;
- return function(scope, element, attr) {
+ return function(scope, element) {
var changeCounter = 0,
childScope;
diff --git a/src/ng/directive/select.js b/src/ng/directive/select.js
index 384b312e..49137b33 100644
--- a/src/ng/directive/select.js
+++ b/src/ng/directive/select.js
@@ -421,7 +421,7 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) {
while(optionGroupsCache.length > groupIndex) {
optionGroupsCache.pop()[0].element.remove();
}
- };
+ }
}
}
}
diff --git a/src/ng/filter/filters.js b/src/ng/filter/filters.js
index f5e96bbf..faea82d4 100644
--- a/src/ng/filter/filters.js
+++ b/src/ng/filter/filters.js
@@ -344,7 +344,7 @@ function dateFilter($locale) {
parts = [],
fn, match;
- format = format || 'mediumDate'
+ format = format || 'mediumDate';
format = $locale.DATETIME_FORMATS[format] || format;
if (isString(date)) {
if (NUMBER_STRING.test(date)) {
@@ -545,4 +545,4 @@ function linkyFilter() {
writer.chars(raw);
return html.join('');
};
-};
+}
diff --git a/src/ng/httpBackend.js b/src/ng/httpBackend.js
index d2784efa..fd825577 100644
--- a/src/ng/httpBackend.js
+++ b/src/ng/httpBackend.js
@@ -108,7 +108,7 @@ function createHttpBackend($browser, XHR, $browserDefer, callbacks, rawDocument,
doneWrapper = function() {
rawDocument.body.removeChild(script);
if (done) done();
- }
+ };
script.type = 'text/javascript';
script.src = url;
@@ -122,5 +122,5 @@ function createHttpBackend($browser, XHR, $browserDefer, callbacks, rawDocument,
}
rawDocument.body.appendChild(script);
- };
+ }
}
diff --git a/src/ng/location.js b/src/ng/location.js
index b0270432..6bed261f 100644
--- a/src/ng/location.js
+++ b/src/ng/location.js
@@ -449,7 +449,7 @@ function $LocationProvider(){
} else {
return hashPrefix;
}
- }
+ };
/**
* @ngdoc property
diff --git a/src/ng/parse.js b/src/ng/parse.js
index cd60bc83..e5cb55d7 100644
--- a/src/ng/parse.js
+++ b/src/ng/parse.js
@@ -161,7 +161,7 @@ function lex(text){
//check if this is not a method invocation and if it is back out to last dot
if (lastDot) {
- peekIndex = index
+ peekIndex = index;
while(peekIndex < text.length) {
var ch = text.charAt(peekIndex);
if (ch == '(') {
@@ -269,7 +269,8 @@ function parser(text, json, $filter){
functionCall = _functionCall,
fieldAccess = _fieldAccess,
objectIndex = _objectIndex,
- filterChain = _filterChain
+ filterChain = _filterChain;
+
if(json){
// The extra level of aliasing is here, just in case the lexer misses something, so that
// we prevent any accidental execution in JSON.
@@ -344,10 +345,6 @@ function parser(text, json, $filter){
};
}
- function hasTokens () {
- return tokens.length > 0;
- }
-
function statements() {
var statements = [];
while(true) {
@@ -497,21 +494,6 @@ function parser(text, json, $filter){
}
}
- function _functionIdent(fnScope) {
- var token = expect();
- var element = token.text.split('.');
- var instance = fnScope;
- var key;
- for ( var i = 0; i < element.length; i++) {
- key = element[i];
- if (instance)
- instance = instance[key];
- }
- if (!isFunction(instance)) {
- throwError("should be a function", token);
- }
- return instance;
- }
function primary() {
var primary;
diff --git a/src/ng/rootScope.js b/src/ng/rootScope.js
index 08f8a428..2541ec24 100644
--- a/src/ng/rootScope.js
+++ b/src/ng/rootScope.js
@@ -66,7 +66,7 @@ function $RootScopeProvider(){
TTL = value;
}
return TTL;
- }
+ };
this.$get = ['$injector', '$exceptionHandler', '$parse',
function( $injector, $exceptionHandler, $parse) {
diff --git a/src/ng/sanitize.js b/src/ng/sanitize.js
index 7ca0711a..6a7a2be4 100644
--- a/src/ng/sanitize.js
+++ b/src/ng/sanitize.js
@@ -110,7 +110,7 @@ function $SanitizeProvider() {
htmlParser(html, htmlSanitizeWriter(buf));
return buf.join('');
});
-};
+}
// Regular Expressions for parsing tags and attributes
var START_TAG_REGEXP = /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,