chore(rename): rename View and Template concepts for #1244
This commit is contained in:

committed by
Jeremy Elbourn

parent
564477b8a0
commit
bf7933714a
@ -17,7 +17,7 @@ var formatter = new DartFormatter();
|
||||
void allTests() {
|
||||
var reader = new TestAssetReader();
|
||||
|
||||
it('should generate a setter for a `bind` property in an annotation.',
|
||||
it('should generate a setter for a `properties` property in an annotation.',
|
||||
() async {
|
||||
var inputPath = 'bind_generator/basic_bind_files/bar.ng_deps.dart';
|
||||
var expected = formatter.format(
|
||||
|
@ -13,7 +13,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [],
|
||||
'annotations': const [
|
||||
const Decorator(
|
||||
selector: '[tool-tip]', bind: const {'text': 'tool-tip'})
|
||||
selector: '[tool-tip]', properties: const {'text': 'tool-tip'})
|
||||
]
|
||||
});
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [],
|
||||
'annotations': const [
|
||||
const Decorator(
|
||||
selector: '[tool-tip]', bind: const {'text': 'tool-tip'})
|
||||
selector: '[tool-tip]', properties: const {'text': 'tool-tip'})
|
||||
]
|
||||
})
|
||||
..registerSetters({'text': (o, String v) => o.text = v});
|
||||
|
@ -14,13 +14,13 @@ void initReflector(reflector) {
|
||||
'annotations': const [
|
||||
const Component(
|
||||
componentServices: const [SaladComponent],
|
||||
bind: const {'menu': 'menu'})
|
||||
properties: const {'menu': 'menu'})
|
||||
]
|
||||
})
|
||||
..registerType(SaladComponent, {
|
||||
'factory': () => new SaladComponent(),
|
||||
'parameters': const [],
|
||||
'annotations': const [const Component(bind: const {'menu': 'menu'})]
|
||||
'annotations': const [const Component(properties: const {'menu': 'menu'})]
|
||||
})
|
||||
..registerSetters({'menu': (o, String v) => o.menu = v});
|
||||
}
|
||||
|
@ -14,12 +14,12 @@ void initReflector(reflector) {
|
||||
'annotations': const [
|
||||
const Component(
|
||||
componentServices: const [SaladComponent],
|
||||
bind: const {'menu': 'menu'})
|
||||
properties: const {'menu': 'menu'})
|
||||
]
|
||||
})
|
||||
..registerType(SaladComponent, {
|
||||
'factory': () => new SaladComponent(),
|
||||
'parameters': const [],
|
||||
'annotations': const [const Component(bind: const {'menu': 'menu'})]
|
||||
'annotations': const [const Component(properties: const {'menu': 'menu'})]
|
||||
});
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [],
|
||||
'annotations': const [
|
||||
const Component(
|
||||
selector: '[soup]', services: const [dep.DependencyComponent])
|
||||
selector: '[soup]', injectables: const [dep.DependencyComponent])
|
||||
]
|
||||
});
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [],
|
||||
'annotations': const [
|
||||
const Component(
|
||||
selector: '[soup]', services: const [dep.DependencyComponent])
|
||||
selector: '[soup]', injectables: const [dep.DependencyComponent])
|
||||
]
|
||||
});
|
||||
i0.initReflector(reflector);
|
||||
|
@ -91,8 +91,8 @@ void allTests() {
|
||||
inputs: {
|
||||
'a|web/index.dart': 'two_annotations_files/index.dart',
|
||||
'a|web/bar.dart': 'two_annotations_files/bar.dart',
|
||||
'angular2|lib/src/core/annotations/template.dart':
|
||||
'../../../lib/src/core/annotations/template.dart'
|
||||
'angular2|lib/src/core/annotations/view.dart':
|
||||
'../../../lib/src/core/annotations/view.dart'
|
||||
},
|
||||
outputs: {
|
||||
'a|web/bar.ng_deps.dart':
|
||||
|
@ -1,10 +1,10 @@
|
||||
library bar;
|
||||
|
||||
import 'package:angular2/src/core/annotations/annotations.dart';
|
||||
import 'package:angular2/src/core/annotations/template.dart';
|
||||
import 'package:angular2/src/core/annotations/view.dart';
|
||||
|
||||
@Component(selector: '[soup]')
|
||||
@Template(inline: 'Salad')
|
||||
@View(template: 'Salad')
|
||||
class MyComponent {
|
||||
MyComponent();
|
||||
}
|
||||
|
@ -2,8 +2,8 @@ library bar.ng_deps.dart;
|
||||
|
||||
import 'bar.dart';
|
||||
import 'package:angular2/src/core/annotations/annotations.dart';
|
||||
import 'package:angular2/src/core/annotations/template.dart';
|
||||
import 'package:angular2/src/core/annotations/template.ng_deps.dart' as i0;
|
||||
import 'package:angular2/src/core/annotations/view.dart';
|
||||
import 'package:angular2/src/core/annotations/view.ng_deps.dart' as i0;
|
||||
import 'package:angular2/src/core/annotations/annotations.ng_deps.dart' as i1;
|
||||
|
||||
bool _visited = false;
|
||||
@ -16,7 +16,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [],
|
||||
'annotations': const [
|
||||
const Component(selector: '[soup]'),
|
||||
const Template(inline: 'Salad')
|
||||
const View(template: 'Salad')
|
||||
]
|
||||
});
|
||||
i0.initReflector(reflector);
|
||||
|
@ -2,7 +2,7 @@ library examples.hello_world.index_common_dart.ng_deps.dart;
|
||||
|
||||
import 'hello.dart';
|
||||
import 'package:angular2/angular2.dart'
|
||||
show bootstrap, Component, Decorator, Template, NgElement;
|
||||
show bootstrap, Component, Decorator, View, NgElement;
|
||||
|
||||
bool _visited = false;
|
||||
void initReflector(reflector) {
|
||||
@ -14,7 +14,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [const []],
|
||||
'annotations': const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const Template(inline: '{{greeting}}')
|
||||
const View(template: '{{greeting}}')
|
||||
]
|
||||
})
|
||||
..registerGetters({'greeting': (o) => o.greeting})
|
||||
|
@ -2,7 +2,7 @@ library examples.hello_world.index_common_dart.ng_deps.dart;
|
||||
|
||||
import 'hello.dart';
|
||||
import 'package:angular2/angular2.dart'
|
||||
show bootstrap, Component, Decorator, Template, NgElement;
|
||||
show bootstrap, Component, Decorator, View, NgElement;
|
||||
|
||||
bool _visited = false;
|
||||
void initReflector(reflector) {
|
||||
@ -14,7 +14,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [const []],
|
||||
'annotations': const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const Template(inline: '{{greeting}}')
|
||||
const View(template: '{{greeting}}')
|
||||
]
|
||||
});
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ library examples.hello_world.index_common_dart.ng_deps.dart;
|
||||
|
||||
import 'hello.dart';
|
||||
import 'package:angular2/angular2.dart'
|
||||
show bootstrap, Component, Decorator, Template, NgElement;
|
||||
show bootstrap, Component, Decorator, View, NgElement;
|
||||
|
||||
bool _visited = false;
|
||||
void initReflector(reflector) {
|
||||
@ -14,7 +14,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [const []],
|
||||
'annotations': const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const Template(inline: '<button (click)=\"action()\">go</button>')
|
||||
const View(template: '<button (click)=\"action()\">go</button>')
|
||||
]
|
||||
})
|
||||
..registerMethods(
|
||||
|
@ -2,7 +2,7 @@ library examples.hello_world.index_common_dart.ng_deps.dart;
|
||||
|
||||
import 'hello.dart';
|
||||
import 'package:angular2/angular2.dart'
|
||||
show bootstrap, Component, Decorator, Template, NgElement;
|
||||
show bootstrap, Component, Decorator, View, NgElement;
|
||||
|
||||
bool _visited = false;
|
||||
void initReflector(reflector) {
|
||||
@ -14,7 +14,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [const []],
|
||||
'annotations': const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const Template(inline: '<button (click)=\"action()\">go</button>')
|
||||
const View(template: '<button (click)=\"action()\">go</button>')
|
||||
]
|
||||
});
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ library examples.src.hello_world.index_common_dart;
|
||||
|
||||
import 'hello.dart';
|
||||
import 'package:angular2/angular2.dart'
|
||||
show bootstrap, Component, Decorator, Template, NgElement;
|
||||
show bootstrap, Component, Decorator, View, NgElement;
|
||||
|
||||
bool _visited = false;
|
||||
void initReflector(reflector) {
|
||||
@ -14,7 +14,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [const []],
|
||||
'annotations': const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const Template(url: 'template.html')
|
||||
const View(templateUrl: 'template.html')
|
||||
]
|
||||
})
|
||||
..registerGetters({'greeting': (o) => o.greeting})
|
||||
|
@ -2,7 +2,7 @@ library examples.src.hello_world.index_common_dart;
|
||||
|
||||
import 'hello.dart';
|
||||
import 'package:angular2/angular2.dart'
|
||||
show bootstrap, Component, Decorator, Template, NgElement;
|
||||
show bootstrap, Component, Decorator, View, NgElement;
|
||||
|
||||
bool _visited = false;
|
||||
void initReflector(reflector) {
|
||||
@ -14,7 +14,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [const []],
|
||||
'annotations': const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const Template(url: 'template.html')
|
||||
const View(templateUrl: 'template.html')
|
||||
]
|
||||
});
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ library examples.src.hello_world.index_common_dart;
|
||||
|
||||
import 'hello.dart';
|
||||
import 'package:angular2/angular2.dart'
|
||||
show bootstrap, Component, Decorator, Template, NgElement;
|
||||
show bootstrap, Component, Decorator, View, NgElement;
|
||||
|
||||
bool _visited = false;
|
||||
void initReflector(reflector) {
|
||||
@ -14,7 +14,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [const []],
|
||||
'annotations': const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const Template(url: 'template.html')
|
||||
const View(templateUrl: 'template.html')
|
||||
]
|
||||
})
|
||||
..registerMethods(
|
||||
|
@ -2,7 +2,7 @@ library examples.src.hello_world.index_common_dart;
|
||||
|
||||
import 'hello.dart';
|
||||
import 'package:angular2/angular2.dart'
|
||||
show bootstrap, Component, Decorator, Template, NgElement;
|
||||
show bootstrap, Component, Decorator, View, NgElement;
|
||||
|
||||
bool _visited = false;
|
||||
void initReflector(reflector) {
|
||||
@ -14,7 +14,7 @@ void initReflector(reflector) {
|
||||
'parameters': const [const []],
|
||||
'annotations': const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const Template(url: 'template.html')
|
||||
const View(templateUrl: 'template.html')
|
||||
]
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user