diff --git a/modules/angular2/src/core/change_detection/change_detector_ref.ts b/modules/angular2/src/core/change_detection/change_detector_ref.ts index 86c3195512..e34fe44857 100644 --- a/modules/angular2/src/core/change_detection/change_detector_ref.ts +++ b/modules/angular2/src/core/change_detection/change_detector_ref.ts @@ -1,8 +1,6 @@ import {ChangeDetector} from './interfaces'; import {ChangeDetectionStrategy} from './constants'; -import {Injectable} from 'angular2/src/core/di'; -@Injectable() export abstract class ChangeDetectorRef { /** * Marks all {@link ChangeDetectionStrategy#OnPush} ancestors as to be checked. diff --git a/modules/angular2/src/core/linker/element_ref.ts b/modules/angular2/src/core/linker/element_ref.ts index ceef37ec0f..a052fb8fa0 100644 --- a/modules/angular2/src/core/linker/element_ref.ts +++ b/modules/angular2/src/core/linker/element_ref.ts @@ -1,5 +1,4 @@ import {unimplemented} from 'angular2/src/facade/exceptions'; -import {Injectable} from 'angular2/src/core/di'; import {AppElement} from './element'; /** @@ -12,7 +11,6 @@ import {AppElement} from './element'; * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM * element. */ -@Injectable() export abstract class ElementRef { /** * The underlying native element or `null` if direct access to native elements is not supported diff --git a/modules/angular2/src/core/linker/template_ref.ts b/modules/angular2/src/core/linker/template_ref.ts index b22b603ff5..ad934be9a1 100644 --- a/modules/angular2/src/core/linker/template_ref.ts +++ b/modules/angular2/src/core/linker/template_ref.ts @@ -1,5 +1,4 @@ import {ElementRef, ElementRef_} from './element_ref'; -import {Injectable} from 'angular2/src/core/di'; /** * Represents an Embedded Template that can be used to instantiate Embedded Views. @@ -13,7 +12,6 @@ import {Injectable} from 'angular2/src/core/di'; * {@link ViewContainerRef#createEmbeddedView}, which will create the View and attach it to the * View Container. */ -@Injectable() export abstract class TemplateRef { /** * The location in the View where the Embedded View logically belongs to. diff --git a/modules/angular2/src/core/linker/view_container_ref.ts b/modules/angular2/src/core/linker/view_container_ref.ts index 8b1c2b827c..3048c8a6f0 100644 --- a/modules/angular2/src/core/linker/view_container_ref.ts +++ b/modules/angular2/src/core/linker/view_container_ref.ts @@ -36,7 +36,6 @@ import { * * */ -@Injectable() export abstract class ViewContainerRef { /** * Anchor element that specifies the location of this container in the containing View. diff --git a/modules/angular2/src/core/render/api.ts b/modules/angular2/src/core/render/api.ts index 37de28fca2..95b89a2be1 100644 --- a/modules/angular2/src/core/render/api.ts +++ b/modules/angular2/src/core/render/api.ts @@ -13,7 +13,6 @@ export class RenderDebugInfo { export interface ParentRenderer { renderComponent(componentType: RenderComponentType): Renderer; } -@Injectable() export abstract class Renderer implements ParentRenderer { abstract renderComponent(componentType: RenderComponentType): Renderer; diff --git a/modules_dart/transform/lib/src/transform/common/code/reflection_info_code.dart b/modules_dart/transform/lib/src/transform/common/code/reflection_info_code.dart index c80316d8fe..e43f0cae4d 100644 --- a/modules_dart/transform/lib/src/transform/common/code/reflection_info_code.dart +++ b/modules_dart/transform/lib/src/transform/common/code/reflection_info_code.dart @@ -67,7 +67,6 @@ class ReflectionInfoVisitor extends RecursiveAstVisitor { @override ReflectionInfoModel visitClassDeclaration(ClassDeclaration node) { - if (node.isAbstract) return null; if (!node.metadata .any((a) => _annotationMatcher.hasMatch(a.name, assetId))) { return null; diff --git a/modules_dart/transform/test/transform/directive_processor/abstract_classes/classes.dart b/modules_dart/transform/test/transform/directive_processor/abstract_classes/classes.dart new file mode 100644 index 0000000000..71f61b5055 --- /dev/null +++ b/modules_dart/transform/test/transform/directive_processor/abstract_classes/classes.dart @@ -0,0 +1,10 @@ +library angular2.test.transform.directive_processor.abstract_classes.classes; + +import 'package:angular2/angular2.dart' show Injectable; + +@Injectable() +abstract class Service { + factory Service(){ + return null; + } +} \ No newline at end of file diff --git a/modules_dart/transform/test/transform/directive_processor/all_tests.dart b/modules_dart/transform/test/transform/directive_processor/all_tests.dart index 86a4a8b58a..60e405a816 100644 --- a/modules_dart/transform/test/transform/directive_processor/all_tests.dart +++ b/modules_dart/transform/test/transform/directive_processor/all_tests.dart @@ -280,6 +280,14 @@ void allTests() { }); }); + it('should record information about abstract classes', + () async { + var model = (await _testCreateModel( + 'abstract_classes/classes.dart')).ngDeps; + + expect(model.reflectables.first.name).toEqual("Service"); + }); + it('should not throw/hang on invalid urls', () async { var logger = new RecordingLogger(); await _testCreateModel('invalid_url_files/hello.dart', logger: logger);