refactor: prefer const over var for constants

Closes #3818
This commit is contained in:
Victor Berchet
2015-08-25 11:22:21 -07:00
parent b29b045d78
commit ecf6ba3974
5 changed files with 8 additions and 9 deletions

View File

@ -2,7 +2,7 @@ import {isBlank, BaseException, isPresent, StringWrapper} from 'angular2/src/cor
import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {NgZone} from 'angular2/src/core/zone/ng_zone';
var BUBBLE_SYMBOL = '^';
const BUBBLE_SYMBOL = '^';
export class EventManager {
constructor(public _plugins: EventManagerPlugin[], public _zone: NgZone) {

View File

@ -327,7 +327,6 @@ class EventBuilder extends AstTransformer {
}
}
var PROPERTY_PARTS_SEPARATOR = new RegExp('\\.');
const ATTRIBUTE_PREFIX = 'attr';
const CLASS_PREFIX = 'class';
const STYLE_PREFIX = 'style';
@ -379,7 +378,7 @@ function isValidElementPropertyBinding(schemaRegistry: ElementSchemaRegistry,
function createElementPropertyBinding(schemaRegistry: ElementSchemaRegistry, ast: ASTWithSource,
propertyNameInTemplate: string): ElementPropertyBinding {
var parts = StringWrapper.split(propertyNameInTemplate, PROPERTY_PARTS_SEPARATOR);
var parts = propertyNameInTemplate.split('.');
if (parts.length === 1) {
var propName = schemaRegistry.getMappedPropName(parts[0]);
return new ElementPropertyBinding(PropertyBindingType.PROPERTY, ast, propName);