refactor(transformer): apply properties/events rename
This commit is contained in:
parent
841f8789fd
commit
30ca0434a2
@ -72,7 +72,7 @@ Future<String> createNgSettersAndGetters(
|
|||||||
NgDeps ngDeps = await NgDeps.parse(reader, entryPoint);
|
NgDeps ngDeps = await NgDeps.parse(reader, entryPoint);
|
||||||
|
|
||||||
String code = ngDeps.code;
|
String code = ngDeps.code;
|
||||||
var setters = _generateSetters(_createPropertiesMap(ngDeps));
|
var setters = _generateSetters(_createInputPropertiesMap(ngDeps));
|
||||||
|
|
||||||
ngDeps.registeredTypes.forEach((t) {
|
ngDeps.registeredTypes.forEach((t) {
|
||||||
final fromAnnotation = new _ExtractQueryFieldsFromAnnotation();
|
final fromAnnotation = new _ExtractQueryFieldsFromAnnotation();
|
||||||
@ -99,7 +99,7 @@ Future<String> createNgSettersAndGetters(
|
|||||||
|
|
||||||
// TODO(kegluneq): De-dupe from template_compiler/generator.dart, #3589.
|
// TODO(kegluneq): De-dupe from template_compiler/generator.dart, #3589.
|
||||||
|
|
||||||
/// Consumes the map generated by {@link _createPropertiesMap} to codegen
|
/// Consumes the map generated by {@link _createInputPropertiesMap} to codegen
|
||||||
/// setters.
|
/// setters.
|
||||||
List<String> _generateSetters(Map<String, String> bindMap) {
|
List<String> _generateSetters(Map<String, String> bindMap) {
|
||||||
var setters = [];
|
var setters = [];
|
||||||
@ -116,18 +116,18 @@ List<String> _generateSetters(Map<String, String> bindMap) {
|
|||||||
return setters;
|
return setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Collapses all `properties` in {@link ngDeps} into a map where the keys are
|
/// Collapses all `inputs` in {@link ngDeps} into a map where the keys are
|
||||||
/// the bind properties and the values are either the one and only type
|
/// the bind inputs and the values are either the one and only type
|
||||||
/// binding to that property or the empty string.
|
/// binding to that property or the empty string.
|
||||||
Map<String, String> _createPropertiesMap(NgDeps ngDeps) {
|
Map<String, String> _createInputPropertiesMap(NgDeps ngDeps) {
|
||||||
var visitor = new ExtractNamedExpressionVisitor('properties');
|
var visitor = new ExtractNamedExpressionVisitor('inputs');
|
||||||
var bindMap = {};
|
var bindMap = {};
|
||||||
ngDeps.registeredTypes.forEach((RegisteredType t) {
|
ngDeps.registeredTypes.forEach((RegisteredType t) {
|
||||||
visitor.bindConfig.clear();
|
visitor.bindConfig.clear();
|
||||||
t.annotations.accept(visitor);
|
t.annotations.accept(visitor);
|
||||||
visitor.bindConfig.forEach((String config) {
|
visitor.bindConfig.forEach((String config) {
|
||||||
// See comments for `Directive` in annotations_impl/annotations.ts for
|
// See comments for `Directive` in annotations_impl/annotations.ts for
|
||||||
// details on how `properties` is specified.
|
// details on how `inputs` is specified.
|
||||||
var prop;
|
var prop;
|
||||||
var idx = config.indexOf(':');
|
var idx = config.indexOf(':');
|
||||||
if (idx > 0) {
|
if (idx > 0) {
|
||||||
|
@ -137,8 +137,8 @@ class _DirectiveMetadataVisitor extends Object
|
|||||||
String _selector;
|
String _selector;
|
||||||
String _exportAs;
|
String _exportAs;
|
||||||
ChangeDetectionStrategy _changeDetection;
|
ChangeDetectionStrategy _changeDetection;
|
||||||
List<String> _properties;
|
List<String> _inputs;
|
||||||
List<String> _events;
|
List<String> _outputs;
|
||||||
Map<String, String> _host;
|
Map<String, String> _host;
|
||||||
List<LifecycleHooks> _lifecycleHooks;
|
List<LifecycleHooks> _lifecycleHooks;
|
||||||
CompileTemplateMetadata _template;
|
CompileTemplateMetadata _template;
|
||||||
@ -153,8 +153,8 @@ class _DirectiveMetadataVisitor extends Object
|
|||||||
_selector = '';
|
_selector = '';
|
||||||
_exportAs = null;
|
_exportAs = null;
|
||||||
_changeDetection = ChangeDetectionStrategy.Default;
|
_changeDetection = ChangeDetectionStrategy.Default;
|
||||||
_properties = <String>[];
|
_inputs = <String>[];
|
||||||
_events = <String>[];
|
_outputs = <String>[];
|
||||||
_host = <String, String>{};
|
_host = <String, String>{};
|
||||||
_lifecycleHooks = null;
|
_lifecycleHooks = null;
|
||||||
_template = null;
|
_template = null;
|
||||||
@ -169,8 +169,8 @@ class _DirectiveMetadataVisitor extends Object
|
|||||||
selector: _selector,
|
selector: _selector,
|
||||||
exportAs: _exportAs,
|
exportAs: _exportAs,
|
||||||
changeDetection: _changeDetection,
|
changeDetection: _changeDetection,
|
||||||
properties: _properties,
|
inputs: _inputs,
|
||||||
events: _events,
|
outputs: _outputs,
|
||||||
host: _host,
|
host: _host,
|
||||||
lifecycleHooks: _lifecycleHooks,
|
lifecycleHooks: _lifecycleHooks,
|
||||||
template: _template);
|
template: _template);
|
||||||
@ -232,7 +232,7 @@ class _DirectiveMetadataVisitor extends Object
|
|||||||
case 'selector':
|
case 'selector':
|
||||||
_populateSelector(node.expression);
|
_populateSelector(node.expression);
|
||||||
break;
|
break;
|
||||||
case 'properties':
|
case 'inputs':
|
||||||
_populateProperties(node.expression);
|
_populateProperties(node.expression);
|
||||||
break;
|
break;
|
||||||
case 'host':
|
case 'host':
|
||||||
@ -244,7 +244,7 @@ class _DirectiveMetadataVisitor extends Object
|
|||||||
case 'changeDetection':
|
case 'changeDetection':
|
||||||
_populateChangeDetection(node.expression);
|
_populateChangeDetection(node.expression);
|
||||||
break;
|
break;
|
||||||
case 'events':
|
case 'outputs':
|
||||||
_populateEvents(node.expression);
|
_populateEvents(node.expression);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -264,9 +264,9 @@ class _DirectiveMetadataVisitor extends Object
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _populateProperties(Expression propertiesValue) {
|
void _populateProperties(Expression inputsValue) {
|
||||||
_checkMeta();
|
_checkMeta();
|
||||||
_populateList(propertiesValue, _properties, 'Directive#properties');
|
_populateList(inputsValue, _inputs, 'Directive#inputs');
|
||||||
}
|
}
|
||||||
|
|
||||||
void _populateHost(Expression hostValue) {
|
void _populateHost(Expression hostValue) {
|
||||||
@ -279,9 +279,9 @@ class _DirectiveMetadataVisitor extends Object
|
|||||||
_exportAs = _expressionToString(exportAsValue, 'Directive#exportAs');
|
_exportAs = _expressionToString(exportAsValue, 'Directive#exportAs');
|
||||||
}
|
}
|
||||||
|
|
||||||
void _populateEvents(Expression eventsValue) {
|
void _populateEvents(Expression outputsValue) {
|
||||||
_checkMeta();
|
_checkMeta();
|
||||||
_populateList(eventsValue, _events, 'Directive#events');
|
_populateList(outputsValue, _outputs, 'Directive#outputs');
|
||||||
}
|
}
|
||||||
|
|
||||||
void _populateChangeDetection(Expression value) {
|
void _populateChangeDetection(Expression value) {
|
||||||
|
@ -15,7 +15,7 @@ class Processor implements CodegenModel {
|
|||||||
final Set<ReflectiveAccessor> methodNames = new Set<ReflectiveAccessor>();
|
final Set<ReflectiveAccessor> methodNames = new Set<ReflectiveAccessor>();
|
||||||
|
|
||||||
void process(CompileDirectiveMetadata meta) {
|
void process(CompileDirectiveMetadata meta) {
|
||||||
meta.events.keys.forEach((eventName) {
|
meta.outputs.keys.forEach((eventName) {
|
||||||
getterNames.add(new ReflectiveAccessor(eventName));
|
getterNames.add(new ReflectiveAccessor(eventName));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ main() => allTests();
|
|||||||
void allTests() {
|
void allTests() {
|
||||||
var reader = new TestAssetReader();
|
var reader = new TestAssetReader();
|
||||||
|
|
||||||
it('should generate a setter for a `properties` property in an annotation.',
|
it('should generate a setter for an `inputs` property in an annotation.',
|
||||||
() async {
|
() async {
|
||||||
var inputPath = 'bind_generator/basic_bind_files/bar.ng_deps.dart';
|
var inputPath = 'bind_generator/basic_bind_files/bar.ng_deps.dart';
|
||||||
var expected = formatter.format(
|
var expected = formatter.format(
|
||||||
@ -27,7 +27,7 @@ void allTests() {
|
|||||||
|
|
||||||
it(
|
it(
|
||||||
'should generate a single setter when multiple annotations bind to the '
|
'should generate a single setter when multiple annotations bind to the '
|
||||||
'same property.', () async {
|
'same `inputs` property.', () async {
|
||||||
var inputPath =
|
var inputPath =
|
||||||
'bind_generator/duplicate_bind_name_files/soup.ng_deps.dart';
|
'bind_generator/duplicate_bind_name_files/soup.ng_deps.dart';
|
||||||
var expected = formatter.format(readFile(
|
var expected = formatter.format(readFile(
|
||||||
|
@ -14,8 +14,8 @@ final ngFor = {
|
|||||||
"moduleUrl": "asset:angular2/lib/src/core/directives/ng_for.dart"
|
"moduleUrl": "asset:angular2/lib/src/core/directives/ng_for.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": null,
|
"changeDetection": null,
|
||||||
"properties": {"ngForOf": "ngForOf"},
|
"inputs": {"ngForOf": "ngForOf"},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/absolute_export_files/bar.dart"
|
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/absolute_export_files/bar.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/absolute_export_files/foo.dart"
|
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/absolute_export_files/foo.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/export_cycle_files/bar.dart"
|
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/export_cycle_files/bar.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/export_cycle_files/baz.dart"
|
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/export_cycle_files/baz.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/export_cycle_files/foo.dart"
|
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/export_cycle_files/foo.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/export_cycle_files/bar.dart"
|
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/export_cycle_files/bar.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/export_cycle_files/foo.dart"
|
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/export_cycle_files/foo.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/recursive_export_files/bar.dart"
|
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/recursive_export_files/bar.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/recursive_export_files/baz.dart"
|
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/recursive_export_files/baz.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/recursive_export_files/foo.dart"
|
"moduleUrl": "asset:angular2/test/transform/directive_metadata_linker/recursive_export_files/foo.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -335,10 +335,10 @@ void allTests() {
|
|||||||
expect(component.exportAs).toEqual('ComponentExportAsValue');
|
expect(component.exportAs).toEqual('ComponentExportAsValue');
|
||||||
expect(component.changeDetection)
|
expect(component.changeDetection)
|
||||||
.toEqual(ChangeDetectionStrategy.CheckAlways);
|
.toEqual(ChangeDetectionStrategy.CheckAlways);
|
||||||
expect(component.properties).toContain('aProperty');
|
expect(component.inputs).toContain('aProperty');
|
||||||
expect(component.properties['aProperty']).toEqual('aProperty');
|
expect(component.inputs['aProperty']).toEqual('aProperty');
|
||||||
expect(component.events).toContain('anEvent');
|
expect(component.outputs).toContain('anEvent');
|
||||||
expect(component.events['anEvent']).toEqual('anEvent');
|
expect(component.outputs['anEvent']).toEqual('anEvent');
|
||||||
expect(component.hostAttributes).toContain('hostKey');
|
expect(component.hostAttributes).toContain('hostKey');
|
||||||
expect(component.hostAttributes['hostKey']).toEqual('hostValue');
|
expect(component.hostAttributes['hostKey']).toEqual('hostValue');
|
||||||
|
|
||||||
@ -347,11 +347,11 @@ void allTests() {
|
|||||||
expect(directive.selector).toEqual('unusual-directive');
|
expect(directive.selector).toEqual('unusual-directive');
|
||||||
expect(directive.isComponent).toBeFalse();
|
expect(directive.isComponent).toBeFalse();
|
||||||
expect(directive.exportAs).toEqual('DirectiveExportAsValue');
|
expect(directive.exportAs).toEqual('DirectiveExportAsValue');
|
||||||
expect(directive.properties).toContain('aDirectiveProperty');
|
expect(directive.inputs).toContain('aDirectiveProperty');
|
||||||
expect(directive.properties['aDirectiveProperty'])
|
expect(directive.inputs['aDirectiveProperty'])
|
||||||
.toEqual('aDirectiveProperty');
|
.toEqual('aDirectiveProperty');
|
||||||
expect(directive.events).toContain('aDirectiveEvent');
|
expect(directive.outputs).toContain('aDirectiveEvent');
|
||||||
expect(directive.events['aDirectiveEvent']).toEqual('aDirectiveEvent');
|
expect(directive.outputs['aDirectiveEvent']).toEqual('aDirectiveEvent');
|
||||||
expect(directive.hostAttributes).toContain('directiveHostKey');
|
expect(directive.hostAttributes).toContain('directiveHostKey');
|
||||||
expect(directive.hostAttributes['directiveHostKey'])
|
expect(directive.hostAttributes['directiveHostKey'])
|
||||||
.toEqual('directiveHostValue');
|
.toEqual('directiveHostValue');
|
||||||
|
@ -7,16 +7,16 @@ import 'package:angular2/angular2.dart'
|
|||||||
selector: 'unusual-comp',
|
selector: 'unusual-comp',
|
||||||
exportAs: 'ComponentExportAsValue',
|
exportAs: 'ComponentExportAsValue',
|
||||||
changeDetection: ChangeDetectionStrategy.CheckAlways,
|
changeDetection: ChangeDetectionStrategy.CheckAlways,
|
||||||
properties: const ['aProperty'],
|
inputs: const ['aProperty'],
|
||||||
host: const {'hostKey': 'hostValue'},
|
host: const {'hostKey': 'hostValue'},
|
||||||
events: const ['anEvent'])
|
outputs: const ['anEvent'])
|
||||||
@View(templateUrl: 'template.html')
|
@View(templateUrl: 'template.html')
|
||||||
class UnusualComp {}
|
class UnusualComp {}
|
||||||
|
|
||||||
@Directive(
|
@Directive(
|
||||||
selector: 'unusual-directive',
|
selector: 'unusual-directive',
|
||||||
exportAs: 'DirectiveExportAsValue',
|
exportAs: 'DirectiveExportAsValue',
|
||||||
properties: const ['aDirectiveProperty'],
|
inputs: const ['aDirectiveProperty'],
|
||||||
host: const {'directiveHostKey': 'directiveHostValue'},
|
host: const {'directiveHostKey': 'directiveHostValue'},
|
||||||
events: const ['aDirectiveEvent'])
|
outputs: const ['aDirectiveEvent'])
|
||||||
class UnusualDirective {}
|
class UnusualDirective {}
|
||||||
|
@ -103,7 +103,7 @@ void allTests() {
|
|||||||
'two_annotations_files/expected/bar.ng_deps.dart'
|
'two_annotations_files/expected/bar.ng_deps.dart'
|
||||||
}),
|
}),
|
||||||
new IntegrationTestConfig(
|
new IntegrationTestConfig(
|
||||||
'should generate getters for events defined on a Component.',
|
'should generate getters for output events defined on a Component.',
|
||||||
inputs: {
|
inputs: {
|
||||||
'a|web/index.dart': 'event_getter_files/index.dart',
|
'a|web/index.dart': 'event_getter_files/index.dart',
|
||||||
'a|web/bar.dart': 'event_getter_files/bar.dart'
|
'a|web/bar.dart': 'event_getter_files/bar.dart'
|
||||||
|
@ -2,7 +2,7 @@ library bar;
|
|||||||
|
|
||||||
import 'package:angular2/src/core/metadata.dart';
|
import 'package:angular2/src/core/metadata.dart';
|
||||||
|
|
||||||
@Component(selector: '[soup]', events: ['eventName1', 'eventName2: propName2'])
|
@Component(selector: '[soup]', outputs: ['eventName1', 'eventName2: propName2'])
|
||||||
@View(template: '')
|
@View(template: '')
|
||||||
class MyComponent {
|
class MyComponent {
|
||||||
MyComponent();
|
MyComponent();
|
||||||
|
@ -16,7 +16,7 @@ void initReflector() {
|
|||||||
MyComponent,
|
MyComponent,
|
||||||
new _ngRef.ReflectionInfo(const [
|
new _ngRef.ReflectionInfo(const [
|
||||||
const Component(
|
const Component(
|
||||||
events: ['eventName1', 'eventName2: propName2'],
|
outputs: ['eventName1', 'eventName2: propName2'],
|
||||||
selector: '[soup]'),
|
selector: '[soup]'),
|
||||||
const View(template: ''),
|
const View(template: ''),
|
||||||
_templates.HostMyComponentTemplate
|
_templates.HostMyComponentTemplate
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
"moduleUrl": "asset:template_compiler/lib/directive_aliases_files/hello1.dart"
|
"moduleUrl": "asset:template_compiler/lib/directive_aliases_files/hello1.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
@ -42,8 +42,8 @@
|
|||||||
"moduleUrl": "asset:template_compiler/lib/directive_aliases_files/hello1.dart"
|
"moduleUrl": "asset:template_compiler/lib/directive_aliases_files/hello1.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
"moduleUrl": "asset:template_compiler/lib/directive_aliases_files/hello1.dart"
|
"moduleUrl": "asset:template_compiler/lib/directive_aliases_files/hello1.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
@ -42,8 +42,8 @@
|
|||||||
"moduleUrl": "asset:template_compiler/lib/directive_aliases_files/hello1.dart"
|
"moduleUrl": "asset:template_compiler/lib/directive_aliases_files/hello1.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -14,7 +14,7 @@ void initReflector(reflector) {
|
|||||||
..registerType(
|
..registerType(
|
||||||
HelloCmp,
|
HelloCmp,
|
||||||
new ReflectionInfo(const [
|
new ReflectionInfo(const [
|
||||||
const Component(selector: 'hello-app', events: const ['eventName']),
|
const Component(selector: 'hello-app', outputs: const ['eventName']),
|
||||||
const View(template: '<button>go</button>'),
|
const View(template: '<button>go</button>'),
|
||||||
_templates.HostHelloCmpTemplate
|
_templates.HostHelloCmpTemplate
|
||||||
], const [
|
], const [
|
||||||
|
@ -12,7 +12,7 @@ void initReflector(reflector) {
|
|||||||
..registerType(
|
..registerType(
|
||||||
HelloCmp,
|
HelloCmp,
|
||||||
new ReflectionInfo(const [
|
new ReflectionInfo(const [
|
||||||
const Component(selector: 'hello-app', events: const ['eventName']),
|
const Component(selector: 'hello-app', outputs: const ['eventName']),
|
||||||
const View(template: '<button>go</button>')
|
const View(template: '<button>go</button>')
|
||||||
], const [
|
], const [
|
||||||
const []
|
const []
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/template_compiler/event_files/hello.dart"
|
"moduleUrl": "asset:angular2/test/transform/template_compiler/event_files/hello.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {"eventName": "eventName"},
|
"outputs": {"eventName": "eventName"},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/template_compiler/inline_expression_files/hello.dart"
|
"moduleUrl": "asset:angular2/test/transform/template_compiler/inline_expression_files/hello.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/template_compiler/inline_method_files/hello.dart"
|
"moduleUrl": "asset:angular2/test/transform/template_compiler/inline_method_files/hello.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/template_compiler/ng_for_files/hello.dart"
|
"moduleUrl": "asset:angular2/test/transform/template_compiler/ng_for_files/hello.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/template_compiler/one_directive_files/hello.dart"
|
"moduleUrl": "asset:angular2/test/transform/template_compiler/one_directive_files/hello.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
@ -42,8 +42,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/template_compiler/one_directive_files/hello.dart"
|
"moduleUrl": "asset:angular2/test/transform/template_compiler/one_directive_files/hello.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/template_compiler/url_expression_files/hello.dart"
|
"moduleUrl": "asset:angular2/test/transform/template_compiler/url_expression_files/hello.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/template_compiler/url_method_files/hello.dart"
|
"moduleUrl": "asset:angular2/test/transform/template_compiler/url_method_files/hello.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/template_compiler/with_prefix_files/goodbye.dart"
|
"moduleUrl": "asset:angular2/test/transform/template_compiler/with_prefix_files/goodbye.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/template_compiler/with_prefix_files/hello.dart"
|
"moduleUrl": "asset:angular2/test/transform/template_compiler/with_prefix_files/hello.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
"moduleUrl": "asset:angular2/test/transform/template_compiler/with_prefix_files/ng2_prefix.dart"
|
"moduleUrl": "asset:angular2/test/transform/template_compiler/with_prefix_files/ng2_prefix.dart"
|
||||||
},
|
},
|
||||||
"changeDetection": 5,
|
"changeDetection": 5,
|
||||||
"properties": {},
|
"inputs": {},
|
||||||
"events": {},
|
"outputs": {},
|
||||||
"hostListeners": {},
|
"hostListeners": {},
|
||||||
"hostProperties": {},
|
"hostProperties": {},
|
||||||
"hostAttributes": {},
|
"hostAttributes": {},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user