Skip to content

Commit 9c76850

Browse files
committed
fix(transformer): Fix annotation_matcher for NgForm directive.
The NgForm directive imports Directive from a previously unlisted import.
1 parent b50edfd commit 9c76850

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎modules/angular2/src/transform/common/annotation_matcher.dart‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ const INJECTABLES = const [
2424
const DIRECTIVES = const [
2525
const AnnotationDescriptor('Directive',
2626
'package:angular2/src/core/annotations/annotations.dart', 'Injectable'),
27+
const AnnotationDescriptor('Directive',
28+
'package:angular2/src/core/annotations/decorators.dart', 'Injectable'),
2729
const AnnotationDescriptor('Directive',
2830
'package:angular2/src/core/annotations_impl/annotations.dart',
2931
'Injectable'),
@@ -38,6 +40,8 @@ const DIRECTIVES = const [
3840
const COMPONENTS = const [
3941
const AnnotationDescriptor('Component',
4042
'package:angular2/src/core/annotations/annotations.dart', 'Directive'),
43+
const AnnotationDescriptor('Component',
44+
'package:angular2/src/core/annotations/decorators.dart', 'Directive'),
4145
const AnnotationDescriptor('Component',
4246
'package:angular2/src/core/annotations_impl/annotations.dart',
4347
'Directive'),

‎modules/angular2/src/transform/template_compiler/change_detector_codegen.dart‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,7 @@ class _CodegenState {
222222

223223
List<String> _getNonNullPipeNames() {
224224
return _records
225-
.where((r) =>
226-
r.mode == RecordType.PIPE)
225+
.where((r) => r.mode == RecordType.PIPE)
227226
.map((r) => _pipeNames[r.selfIndex])
228227
.toList();
229228
}

‎modules/angular2/src/transform/template_compiler/generator.dart‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ class _TemplateExtractor {
8585

8686
_TemplateExtractor(XHR xhr)
8787
: _factory = new CompileStepFactory(new ng.Parser(new ng.Lexer())) {
88-
8988
var urlResolver = new UrlResolver();
9089
var styleUrlResolver = new StyleUrlResolver(urlResolver);
9190
var styleInliner = new StyleInliner(xhr, styleUrlResolver, urlResolver);
@@ -110,8 +109,7 @@ class _TemplateExtractor {
110109

111110
var compileElements =
112111
pipeline.process(templateEl, ViewType.COMPONENT, viewDef.componentId);
113-
var protoViewDto = compileElements[0].inheritedProtoView
114-
.build();
112+
var protoViewDto = compileElements[0].inheritedProtoView.build();
115113

116114
reflector.reflectionCapabilities = savedReflectionCapabilities;
117115

‎modules/angular2/test/transform/directive_processor/all_tests.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ void allTests() {
4949
readFile(
5050
'directive_processor/absolute_url_expression_files/template.css'));
5151
_testNgDeps('should inline `templateUrl` and `styleUrls` values expressed as'
52-
' absolute urls.',
53-
'absolute_url_expression_files/hello.dart', reader: absoluteReader);
52+
' absolute urls.', 'absolute_url_expression_files/hello.dart',
53+
reader: absoluteReader);
5454

5555
_testNgDeps(
5656
'should inline multiple `styleUrls` values expressed as absolute urls.',

0 commit comments

Comments
 (0)