diff --git a/modules/angular2/src/core/change_detection/change_detection_jit_generator.ts b/modules/angular2/src/core/change_detection/change_detection_jit_generator.ts index 28f44c9794..9b2dff23f5 100644 --- a/modules/angular2/src/core/change_detection/change_detection_jit_generator.ts +++ b/modules/angular2/src/core/change_detection/change_detection_jit_generator.ts @@ -25,10 +25,10 @@ import {ChangeDetectionStrategy} from './constants'; * `angular2.transform.template_compiler.change_detector_codegen` library. If you make updates * here, please make equivalent changes there. */ -var ABSTRACT_CHANGE_DETECTOR = "AbstractChangeDetector"; -var UTIL = "ChangeDetectionUtil"; -var IS_CHANGED_LOCAL = "isChanged"; -var CHANGES_LOCAL = "changes"; +const ABSTRACT_CHANGE_DETECTOR = "AbstractChangeDetector"; +const UTIL = "ChangeDetectionUtil"; +const IS_CHANGED_LOCAL = "isChanged"; +const CHANGES_LOCAL = "changes"; export class ChangeDetectorJITGenerator { _logic: CodegenLogicUtil; diff --git a/modules/angular2/src/core/debug/debug_element_view_listener.ts b/modules/angular2/src/core/debug/debug_element_view_listener.ts index 6bdbc38168..9e9711723b 100644 --- a/modules/angular2/src/core/debug/debug_element_view_listener.ts +++ b/modules/angular2/src/core/debug/debug_element_view_listener.ts @@ -10,7 +10,7 @@ import {DebugElement} from './debug_element'; const NG_ID_PROPERTY = 'ngid'; const INSPECT_GLOBAL_NAME = 'ng.probe'; -var NG_ID_SEPARATOR = '#'; +const NG_ID_SEPARATOR = '#'; // Need to keep the views in a global Map so that multiple angular apps are supported var _allIdsByView = new Map(); diff --git a/modules/angular2/src/core/render/dom/events/event_manager.ts b/modules/angular2/src/core/render/dom/events/event_manager.ts index 91e3d94e05..54b8728329 100644 --- a/modules/angular2/src/core/render/dom/events/event_manager.ts +++ b/modules/angular2/src/core/render/dom/events/event_manager.ts @@ -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) { diff --git a/modules/angular2/src/core/render/dom/view/proto_view_builder.ts b/modules/angular2/src/core/render/dom/view/proto_view_builder.ts index b0b3d519b3..556effa131 100644 --- a/modules/angular2/src/core/render/dom/view/proto_view_builder.ts +++ b/modules/angular2/src/core/render/dom/view/proto_view_builder.ts @@ -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); diff --git a/modules/angular2/test/core/change_detection/change_detector_config.ts b/modules/angular2/test/core/change_detection/change_detector_config.ts index 9dc8c04e99..f246286279 100644 --- a/modules/angular2/test/core/change_detection/change_detector_config.ts +++ b/modules/angular2/test/core/change_detection/change_detector_config.ts @@ -59,7 +59,7 @@ function _convertLocalsToVariableBindings(locals: Locals): any[] { return variableBindings; } -export var PROP_NAME = 'propName'; +export const PROP_NAME = 'propName'; /** * In this case, we expect `id` and `expression` to be the same string.