style(dart): Format with dartfmt v0.2.0
Format all pure Dart code with package:dart_style v0.2.0 Command: ``` find -type f -name "*.dart" | xargs dartformat -w ```
This commit is contained in:
+9
-7
@@ -11,13 +11,15 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(HelloCmp, new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''{{greeting}}''',
|
||||
templateUrl: r'package:other_package/template.html',
|
||||
styles: const [r'''.greeting { .color: blue; }''',])
|
||||
], const [], () => new HelloCmp()))
|
||||
..registerType(
|
||||
HelloCmp,
|
||||
new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''{{greeting}}''',
|
||||
templateUrl: r'package:other_package/template.html',
|
||||
styles: const [r'''.greeting { .color: blue; }''',])
|
||||
], const [], () => new HelloCmp()))
|
||||
..registerFunction(
|
||||
hello, new _ngRef.ReflectionInfo(const [const Injectable()], const []));
|
||||
}
|
||||
|
||||
@@ -35,9 +35,9 @@ void allTests() {
|
||||
'custom_metadata/relative_soup.dart',
|
||||
assetId: new AssetId('soup', 'lib/relative_soup.dart'),
|
||||
customDescriptors: [
|
||||
const ClassDescriptor('Soup', 'package:soup/annotations/soup.dart',
|
||||
superClass: 'Component'),
|
||||
]);
|
||||
const ClassDescriptor('Soup', 'package:soup/annotations/soup.dart',
|
||||
superClass: 'Component'),
|
||||
]);
|
||||
|
||||
_testProcessor(
|
||||
'Requires the specified import.', 'custom_metadata/bad_soup.dart',
|
||||
@@ -50,14 +50,18 @@ void allTests() {
|
||||
'should inline `templateUrl` values.', 'url_expression_files/hello.dart');
|
||||
|
||||
var absoluteReader = new TestAssetReader();
|
||||
absoluteReader.addAsset(new AssetId('other_package', 'lib/template.html'),
|
||||
absoluteReader.addAsset(
|
||||
new AssetId('other_package', 'lib/template.html'),
|
||||
readFile(
|
||||
'directive_processor/absolute_url_expression_files/template.html'));
|
||||
absoluteReader.addAsset(new AssetId('other_package', 'lib/template.css'),
|
||||
absoluteReader.addAsset(
|
||||
new AssetId('other_package', 'lib/template.css'),
|
||||
readFile(
|
||||
'directive_processor/absolute_url_expression_files/template.css'));
|
||||
_testProcessor('should inline `templateUrl` and `styleUrls` values expressed'
|
||||
' as absolute urls.', 'absolute_url_expression_files/hello.dart',
|
||||
_testProcessor(
|
||||
'should inline `templateUrl` and `styleUrls` values expressed'
|
||||
' as absolute urls.',
|
||||
'absolute_url_expression_files/hello.dart',
|
||||
reader: absoluteReader);
|
||||
|
||||
_testProcessor(
|
||||
@@ -68,12 +72,16 @@ void allTests() {
|
||||
readFile('directive_processor/multiple_style_urls_files/template.html'));
|
||||
absoluteReader.addAsset(new AssetId('a', 'lib/template.css'),
|
||||
readFile('directive_processor/multiple_style_urls_files/template.css'));
|
||||
absoluteReader.addAsset(new AssetId('a', 'lib/template_other.css'), readFile(
|
||||
'directive_processor/multiple_style_urls_files/template_other.css'));
|
||||
absoluteReader.addAsset(
|
||||
new AssetId('a', 'lib/template_other.css'),
|
||||
readFile(
|
||||
'directive_processor/multiple_style_urls_files/template_other.css'));
|
||||
_testProcessor(
|
||||
'shouldn\'t inline multiple `styleUrls` values expressed as absolute '
|
||||
'urls.', 'multiple_style_urls_not_inlined_files/hello.dart',
|
||||
inlineViews: false, reader: absoluteReader);
|
||||
'urls.',
|
||||
'multiple_style_urls_not_inlined_files/hello.dart',
|
||||
inlineViews: false,
|
||||
reader: absoluteReader);
|
||||
|
||||
_testProcessor('should inline `templateUrl`s expressed as adjacent strings.',
|
||||
'split_url_expression_files/hello.dart');
|
||||
@@ -118,12 +126,16 @@ void allTests() {
|
||||
'static_function_files/hello.dart');
|
||||
|
||||
_testProcessor('should find direcive aliases patterns.',
|
||||
'directive_aliases_files/hello.dart', reader: absoluteReader);
|
||||
'directive_aliases_files/hello.dart',
|
||||
reader: absoluteReader);
|
||||
}
|
||||
|
||||
void _testProcessor(String name, String inputPath,
|
||||
{List<AnnotationDescriptor> customDescriptors: const [], AssetId assetId,
|
||||
AssetReader reader, List<String> expectedLogs, bool inlineViews: true,
|
||||
{List<AnnotationDescriptor> customDescriptors: const [],
|
||||
AssetId assetId,
|
||||
AssetReader reader,
|
||||
List<String> expectedLogs,
|
||||
bool inlineViews: true,
|
||||
bool isolate: false}) {
|
||||
var testFn = isolate ? iit : it;
|
||||
testFn(name, () async {
|
||||
@@ -149,7 +161,8 @@ void _testProcessor(String name, String inputPath,
|
||||
..addAll(customDescriptors);
|
||||
var ngMeta = new NgMeta.empty();
|
||||
var output = await createNgDeps(
|
||||
reader, inputId, annotationMatcher, ngMeta, inlineViews: inlineViews);
|
||||
reader, inputId, annotationMatcher, ngMeta,
|
||||
inlineViews: inlineViews);
|
||||
if (output == null) {
|
||||
expect(await reader.hasInput(expectedNgDepsId)).toBeFalse();
|
||||
} else {
|
||||
|
||||
+4
-2
@@ -10,6 +10,8 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(PackageSoup, new _ngRef.ReflectionInfo(
|
||||
const [const Soup()], const [], () => new PackageSoup()));
|
||||
..registerType(
|
||||
PackageSoup,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [const Soup()], const [], () => new PackageSoup()));
|
||||
}
|
||||
|
||||
+4
-2
@@ -10,6 +10,8 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(RelativeSoup, new _ngRef.ReflectionInfo(
|
||||
const [const Soup()], const [], () => new RelativeSoup()));
|
||||
..registerType(
|
||||
RelativeSoup,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [const Soup()], const [], () => new RelativeSoup()));
|
||||
}
|
||||
|
||||
+9
-7
@@ -13,11 +13,13 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(HelloCmp, new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''{{greeting}}''',
|
||||
templateUrl: r'template.html',
|
||||
styles: const [r'''.greeting { .color: blue; }''',])
|
||||
], const [], () => new HelloCmp()));
|
||||
..registerType(
|
||||
HelloCmp,
|
||||
new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''{{greeting}}''',
|
||||
templateUrl: r'template.html',
|
||||
styles: const [r'''.greeting { .color: blue; }''',])
|
||||
], const [], () => new HelloCmp()));
|
||||
}
|
||||
|
||||
@@ -11,14 +11,16 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(HelloCmp, new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''{{greeting}}''',
|
||||
templateUrl: r'template.html',
|
||||
styles: const [
|
||||
r'''.greeting { .color: blue; }''',
|
||||
r'''.hello { .color: red; }''',
|
||||
])
|
||||
], const [], () => new HelloCmp()));
|
||||
..registerType(
|
||||
HelloCmp,
|
||||
new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''{{greeting}}''',
|
||||
templateUrl: r'template.html',
|
||||
styles: const [
|
||||
r'''.greeting { .color: blue; }''',
|
||||
r'''.hello { .color: red; }''',
|
||||
])
|
||||
], const [], () => new HelloCmp()));
|
||||
}
|
||||
|
||||
+7
-3
@@ -10,7 +10,11 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(ChangingSoupComponent, new _ngRef.ReflectionInfo(
|
||||
const [const Component(selector: '[soup]')], const [],
|
||||
() => new ChangingSoupComponent(), const [PrimaryInterface]));
|
||||
..registerType(
|
||||
ChangingSoupComponent,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [const Component(selector: '[soup]')],
|
||||
const [],
|
||||
() => new ChangingSoupComponent(),
|
||||
const [PrimaryInterface]));
|
||||
}
|
||||
|
||||
+53
-23
@@ -10,27 +10,57 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(OnChangeSoupComponent, new _ngRef.ReflectionInfo(const [
|
||||
const Component(
|
||||
selector: '[soup]', lifecycle: const [LifecycleEvent.onChange])
|
||||
], const [], () => new OnChangeSoupComponent(), const [OnChange]))
|
||||
..registerType(OnDestroySoupComponent, new _ngRef.ReflectionInfo(const [
|
||||
const Component(
|
||||
selector: '[soup]', lifecycle: const [LifecycleEvent.onDestroy])
|
||||
], const [], () => new OnDestroySoupComponent(), const [OnDestroy]))
|
||||
..registerType(OnCheckSoupComponent, new _ngRef.ReflectionInfo(const [
|
||||
const Component(
|
||||
selector: '[soup]', lifecycle: const [LifecycleEvent.onCheck])
|
||||
], const [], () => new OnCheckSoupComponent(), const [OnCheck]))
|
||||
..registerType(OnInitSoupComponent, new _ngRef.ReflectionInfo(const [
|
||||
const Component(
|
||||
selector: '[soup]', lifecycle: const [LifecycleEvent.onInit])
|
||||
], const [], () => new OnInitSoupComponent(), const [OnInit]))
|
||||
..registerType(OnAllChangesDoneSoupComponent, new _ngRef.ReflectionInfo(
|
||||
const [
|
||||
const Component(
|
||||
selector: '[soup]',
|
||||
lifecycle: const [LifecycleEvent.onAllChangesDone])
|
||||
], const [], () => new OnAllChangesDoneSoupComponent(),
|
||||
const [OnAllChangesDone]));
|
||||
..registerType(
|
||||
OnChangeSoupComponent,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [
|
||||
const Component(
|
||||
selector: '[soup]',
|
||||
lifecycle: const [LifecycleEvent.onChange])
|
||||
],
|
||||
const [],
|
||||
() => new OnChangeSoupComponent(),
|
||||
const [OnChange]))
|
||||
..registerType(
|
||||
OnDestroySoupComponent,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [
|
||||
const Component(
|
||||
selector: '[soup]',
|
||||
lifecycle: const [LifecycleEvent.onDestroy])
|
||||
],
|
||||
const [],
|
||||
() => new OnDestroySoupComponent(),
|
||||
const [OnDestroy]))
|
||||
..registerType(
|
||||
OnCheckSoupComponent,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [
|
||||
const Component(
|
||||
selector: '[soup]', lifecycle: const [LifecycleEvent.onCheck])
|
||||
],
|
||||
const [],
|
||||
() => new OnCheckSoupComponent(),
|
||||
const [OnCheck]))
|
||||
..registerType(
|
||||
OnInitSoupComponent,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [
|
||||
const Component(
|
||||
selector: '[soup]', lifecycle: const [LifecycleEvent.onInit])
|
||||
],
|
||||
const [],
|
||||
() => new OnInitSoupComponent(),
|
||||
const [OnInit]))
|
||||
..registerType(
|
||||
OnAllChangesDoneSoupComponent,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [
|
||||
const Component(
|
||||
selector: '[soup]',
|
||||
lifecycle: const [LifecycleEvent.onAllChangesDone])
|
||||
],
|
||||
const [],
|
||||
() => new OnAllChangesDoneSoupComponent(),
|
||||
const [OnAllChangesDone]));
|
||||
}
|
||||
|
||||
+7
-3
@@ -10,7 +10,11 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(ChangingSoupComponent, new _ngRef.ReflectionInfo(
|
||||
const [const Component(selector: '[soup]')], const [],
|
||||
() => new ChangingSoupComponent(), const [OnChange, AnotherInterface]));
|
||||
..registerType(
|
||||
ChangingSoupComponent,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [const Component(selector: '[soup]')],
|
||||
const [],
|
||||
() => new ChangingSoupComponent(),
|
||||
const [OnChange, AnotherInterface]));
|
||||
}
|
||||
|
||||
+9
-7
@@ -11,11 +11,13 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(HelloCmp, new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''''',
|
||||
templateUrl: r'/bad/absolute/url.html',
|
||||
styles: const [r'''''', r'''''',])
|
||||
], const [], () => new HelloCmp()));
|
||||
..registerType(
|
||||
HelloCmp,
|
||||
new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''''',
|
||||
templateUrl: r'/bad/absolute/url.html',
|
||||
styles: const [r'''''', r'''''',])
|
||||
], const [], () => new HelloCmp()));
|
||||
}
|
||||
|
||||
+40
-22
@@ -10,26 +10,44 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(MultiSoupComponent, new _ngRef.ReflectionInfo(const [
|
||||
const Component(
|
||||
selector: '[soup]',
|
||||
lifecycle: const [
|
||||
LifecycleEvent.onChange,
|
||||
LifecycleEvent.onDestroy,
|
||||
LifecycleEvent.onInit
|
||||
])
|
||||
], const [], () => new MultiSoupComponent(), const [
|
||||
OnChange,
|
||||
OnDestroy,
|
||||
OnInit
|
||||
]))
|
||||
..registerType(MixedSoupComponent, new _ngRef.ReflectionInfo(const [
|
||||
const Component(
|
||||
selector: '[soup]',
|
||||
lifecycle: const [LifecycleEvent.onChange, LifecycleEvent.onCheck])
|
||||
], const [], () => new MixedSoupComponent(), const [OnChange]))
|
||||
..registerType(MatchedSoupComponent, new _ngRef.ReflectionInfo(const [
|
||||
const Component(
|
||||
selector: '[soup]', lifecycle: const [LifecycleEvent.onChange])
|
||||
], const [], () => new MatchedSoupComponent(), const [OnChange]));
|
||||
..registerType(
|
||||
MultiSoupComponent,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [
|
||||
const Component(
|
||||
selector: '[soup]',
|
||||
lifecycle: const [
|
||||
LifecycleEvent.onChange,
|
||||
LifecycleEvent.onDestroy,
|
||||
LifecycleEvent.onInit
|
||||
])
|
||||
],
|
||||
const [],
|
||||
() => new MultiSoupComponent(),
|
||||
const [OnChange, OnDestroy, OnInit]))
|
||||
..registerType(
|
||||
MixedSoupComponent,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [
|
||||
const Component(
|
||||
selector: '[soup]',
|
||||
lifecycle: const [
|
||||
LifecycleEvent.onChange,
|
||||
LifecycleEvent.onCheck
|
||||
])
|
||||
],
|
||||
const [],
|
||||
() => new MixedSoupComponent(),
|
||||
const [OnChange]))
|
||||
..registerType(
|
||||
MatchedSoupComponent,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [
|
||||
const Component(
|
||||
selector: '[soup]',
|
||||
lifecycle: const [LifecycleEvent.onChange])
|
||||
],
|
||||
const [],
|
||||
() => new MatchedSoupComponent(),
|
||||
const [OnChange]));
|
||||
}
|
||||
|
||||
+12
-10
@@ -11,14 +11,16 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(HelloCmp, new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''{{greeting}}''',
|
||||
templateUrl: r'template.html',
|
||||
styles: const [
|
||||
r'''.greeting { .color: blue; }''',
|
||||
r'''.hello { .color: red; }''',
|
||||
])
|
||||
], const [], () => new HelloCmp()));
|
||||
..registerType(
|
||||
HelloCmp,
|
||||
new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''{{greeting}}''',
|
||||
templateUrl: r'template.html',
|
||||
styles: const [
|
||||
r'''.greeting { .color: blue; }''',
|
||||
r'''.hello { .color: red; }''',
|
||||
])
|
||||
], const [], () => new HelloCmp()));
|
||||
}
|
||||
|
||||
+11
-9
@@ -11,13 +11,15 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(HelloCmp, new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
templateUrl: 'package:a/template.html',
|
||||
styleUrls: const [
|
||||
'package:a/template.css',
|
||||
'package:a/template_other.css'
|
||||
])
|
||||
], const [], () => new HelloCmp()));
|
||||
..registerType(
|
||||
HelloCmp,
|
||||
new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
templateUrl: 'package:a/template.html',
|
||||
styleUrls: const [
|
||||
'package:a/template.css',
|
||||
'package:a/template_other.css'
|
||||
])
|
||||
], const [], () => new HelloCmp()));
|
||||
}
|
||||
|
||||
+8
-5
@@ -10,9 +10,12 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(SoupComponent, new _ngRef.ReflectionInfo(
|
||||
const [const Component(selector: '[soup]')], const [
|
||||
const [String, Tasty],
|
||||
const [const Inject(Salt)]
|
||||
], (String description, salt) => new SoupComponent(description, salt)));
|
||||
..registerType(
|
||||
SoupComponent,
|
||||
new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: '[soup]')
|
||||
], const [
|
||||
const [String, Tasty],
|
||||
const [const Inject(Salt)]
|
||||
], (String description, salt) => new SoupComponent(description, salt)));
|
||||
}
|
||||
|
||||
+11
-4
@@ -10,8 +10,15 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(OnChangeSoupComponent, new _ngRef.ReflectionInfo(const [
|
||||
const prefix.Component(
|
||||
selector: '[soup]', lifecycle: const [prefix.LifecycleEvent.onChange])
|
||||
], const [], () => new OnChangeSoupComponent(), const [prefix.OnChange]));
|
||||
..registerType(
|
||||
OnChangeSoupComponent,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [
|
||||
const prefix.Component(
|
||||
selector: '[soup]',
|
||||
lifecycle: const [prefix.LifecycleEvent.onChange])
|
||||
],
|
||||
const [],
|
||||
() => new OnChangeSoupComponent(),
|
||||
const [prefix.OnChange]));
|
||||
}
|
||||
|
||||
+7
-4
@@ -11,8 +11,11 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(HelloCmp, new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(template: r'''{{greeting}}''', templateUrl: r'template.html')
|
||||
], const [], () => new HelloCmp()));
|
||||
..registerType(
|
||||
HelloCmp,
|
||||
new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''{{greeting}}''', templateUrl: r'template.html')
|
||||
], const [], () => new HelloCmp()));
|
||||
}
|
||||
|
||||
+11
-4
@@ -10,8 +10,15 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerFunction(getMessage, new _ngRef.ReflectionInfo(
|
||||
const [const Injectable()], const [const [const Inject(Message)]]))
|
||||
..registerType(Message, new _ngRef.ReflectionInfo(
|
||||
const [const Injectable()], const [], () => new Message()));
|
||||
..registerFunction(
|
||||
getMessage,
|
||||
new _ngRef.ReflectionInfo(const [
|
||||
const Injectable()
|
||||
], const [
|
||||
const [const Inject(Message)]
|
||||
]))
|
||||
..registerType(
|
||||
Message,
|
||||
new _ngRef.ReflectionInfo(
|
||||
const [const Injectable()], const [], () => new Message()));
|
||||
}
|
||||
|
||||
+4
-3
@@ -10,7 +10,8 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(ChangingSoupComponent, new _ngRef.ReflectionInfo(
|
||||
const [const Component(selector: '[soup]')], const [],
|
||||
() => new ChangingSoupComponent()));
|
||||
..registerType(
|
||||
ChangingSoupComponent,
|
||||
new _ngRef.ReflectionInfo(const [const Component(selector: '[soup]')],
|
||||
const [], () => new ChangingSoupComponent()));
|
||||
}
|
||||
|
||||
+6
-4
@@ -10,8 +10,10 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(OnChangeSoupComponent, new _ngRef.ReflectionInfo(const [
|
||||
const Component(
|
||||
selector: '[soup]', lifecycle: const [LifecycleEvent.onChange])
|
||||
], const [], () => new OnChangeSoupComponent()));
|
||||
..registerType(
|
||||
OnChangeSoupComponent,
|
||||
new _ngRef.ReflectionInfo(const [
|
||||
const Component(
|
||||
selector: '[soup]', lifecycle: const [LifecycleEvent.onChange])
|
||||
], const [], () => new OnChangeSoupComponent()));
|
||||
}
|
||||
|
||||
+7
-4
@@ -11,8 +11,11 @@ void initReflector() {
|
||||
if (_visited) return;
|
||||
_visited = true;
|
||||
_ngRef.reflector
|
||||
..registerType(HelloCmp, new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(template: r'''{{greeting}}''', templateUrl: r'template.html')
|
||||
], const [], () => new HelloCmp()));
|
||||
..registerType(
|
||||
HelloCmp,
|
||||
new _ngRef.ReflectionInfo(const [
|
||||
const Component(selector: 'hello-app'),
|
||||
const View(
|
||||
template: r'''{{greeting}}''', templateUrl: r'template.html')
|
||||
], const [], () => new HelloCmp()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user