Skip to content

Commit

Permalink
fix(transformer): Fix annotation_matcher for NgForm directive.
Browse files Browse the repository at this point in the history
The NgForm directive imports Directive from a previously unlisted import.
  • Loading branch information
jakemac53 committed Jun 26, 2015
1 parent b50edfd commit 9c76850
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 4 additions & 0 deletions modules/angular2/src/transform/common/annotation_matcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const INJECTABLES = const [
const DIRECTIVES = const [
const AnnotationDescriptor('Directive',
'package:angular2/src/core/annotations/annotations.dart', 'Injectable'),
const AnnotationDescriptor('Directive',
'package:angular2/src/core/annotations/decorators.dart', 'Injectable'),
const AnnotationDescriptor('Directive',
'package:angular2/src/core/annotations_impl/annotations.dart',
'Injectable'),
Expand All @@ -38,6 +40,8 @@ const DIRECTIVES = const [
const COMPONENTS = const [
const AnnotationDescriptor('Component',
'package:angular2/src/core/annotations/annotations.dart', 'Directive'),
const AnnotationDescriptor('Component',
'package:angular2/src/core/annotations/decorators.dart', 'Directive'),
const AnnotationDescriptor('Component',
'package:angular2/src/core/annotations_impl/annotations.dart',
'Directive'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ class _CodegenState {

List<String> _getNonNullPipeNames() {
return _records
.where((r) =>
r.mode == RecordType.PIPE)
.where((r) => r.mode == RecordType.PIPE)
.map((r) => _pipeNames[r.selfIndex])
.toList();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class _TemplateExtractor {

_TemplateExtractor(XHR xhr)
: _factory = new CompileStepFactory(new ng.Parser(new ng.Lexer())) {

var urlResolver = new UrlResolver();
var styleUrlResolver = new StyleUrlResolver(urlResolver);
var styleInliner = new StyleInliner(xhr, styleUrlResolver, urlResolver);
Expand All @@ -110,8 +109,7 @@ class _TemplateExtractor {

var compileElements =
pipeline.process(templateEl, ViewType.COMPONENT, viewDef.componentId);
var protoViewDto = compileElements[0].inheritedProtoView
.build();
var protoViewDto = compileElements[0].inheritedProtoView.build();

reflector.reflectionCapabilities = savedReflectionCapabilities;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ void allTests() {
readFile(
'directive_processor/absolute_url_expression_files/template.css'));
_testNgDeps('should inline `templateUrl` and `styleUrls` values expressed as'
' absolute urls.',
'absolute_url_expression_files/hello.dart', reader: absoluteReader);
' absolute urls.', 'absolute_url_expression_files/hello.dart',
reader: absoluteReader);

_testNgDeps(
'should inline multiple `styleUrls` values expressed as absolute urls.',
Expand Down

0 comments on commit 9c76850

Please sign in to comment.