diff options
| author | Misko Hevery | 2011-02-12 08:58:11 -0800 |
|---|---|---|
| committer | Misko Hevery | 2011-02-16 08:59:57 -0500 |
| commit | cdc093a463e8f8a925cbb9f2b55bedf0a1d8e7e8 (patch) | |
| tree | c481c1b86986f156646eafc9d0ec4db852edb455 /src/directives.js | |
| parent | 00cc9eb32a9387040d0175fcfd21cf9dcab6514f (diff) | |
| download | angular.js-cdc093a463e8f8a925cbb9f2b55bedf0a1d8e7e8.tar.bz2 | |
reformated multiline trinary expressions to have a leading ?/:.
Diffstat (limited to 'src/directives.js')
| -rw-r--r-- | src/directives.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/directives.js b/src/directives.js index 06a99149..53601a4f 100644 --- a/src/directives.js +++ b/src/directives.js @@ -243,15 +243,17 @@ function compileBindTemplate(template){ var bindings = []; forEach(parseBindings(template), function(text){ var exp = binding(text); - bindings.push(exp ? function(element){ - var error, value = this.$tryEval(exp, function(e){ - error = toJson(e); - }); - elementError(element, NG_EXCEPTION, error); - return error ? error : value; - } : function() { - return text; - }); + bindings.push(exp + ? function(element){ + var error, value = this.$tryEval(exp, function(e){ + error = toJson(e); + }); + elementError(element, NG_EXCEPTION, error); + return error ? error : value; + } + : function() { + return text; + }); }); bindTemplateCache[template] = fn = function(element, prettyPrintJson){ var parts = [], self = this, |
