File tree Expand file tree Collapse file tree 8 files changed +18
-9
lines changed
lib/src/transform/common/code
test/transform/directive_processor
modules/angular2/src/core Expand file tree Collapse file tree 8 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 11import { ChangeDetector } from './interfaces' ;
22import { ChangeDetectionStrategy } from './constants' ;
3- import { Injectable } from 'angular2/src/core/di' ;
43
5- @Injectable ( )
64export abstract class ChangeDetectorRef {
75 /**
86 * Marks all {@link ChangeDetectionStrategy#OnPush} ancestors as to be checked.
Original file line number Diff line number Diff line change 11import { unimplemented } from 'angular2/src/facade/exceptions' ;
2- import { Injectable } from 'angular2/src/core/di' ;
32import { AppElement } from './element' ;
43
54/**
@@ -12,7 +11,6 @@ import {AppElement} from './element';
1211 * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM
1312 * element.
1413 */
15- @Injectable ( )
1614export abstract class ElementRef {
1715 /**
1816 * The underlying native element or `null` if direct access to native elements is not supported
Original file line number Diff line number Diff line change 11import { ElementRef , ElementRef_ } from './element_ref' ;
2- import { Injectable } from 'angular2/src/core/di' ;
32
43/**
54 * Represents an Embedded Template that can be used to instantiate Embedded Views.
@@ -13,7 +12,6 @@ import {Injectable} from 'angular2/src/core/di';
1312 * {@link ViewContainerRef#createEmbeddedView}, which will create the View and attach it to the
1413 * View Container.
1514 */
16- @Injectable ( )
1715export abstract class TemplateRef {
1816 /**
1917 * The location in the View where the Embedded View logically belongs to.
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ import {
3636 *
3737 * <!-- TODO(i): we are also considering ElementRef#viewContainer api -->
3838 */
39- @Injectable ( )
4039export abstract class ViewContainerRef {
4140 /**
4241 * Anchor element that specifies the location of this container in the containing View.
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ export class RenderDebugInfo {
1313
1414export interface ParentRenderer { renderComponent ( componentType : RenderComponentType ) : Renderer ; }
1515
16- @Injectable ( )
1716export abstract class Renderer implements ParentRenderer {
1817 abstract renderComponent ( componentType : RenderComponentType ) : Renderer ;
1918
Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ class ReflectionInfoVisitor extends RecursiveAstVisitor<ReflectionInfoModel> {
6767
6868 @override
6969 ReflectionInfoModel visitClassDeclaration (ClassDeclaration node) {
70- if (node.isAbstract) return null ;
7170 if (! node.metadata
7271 .any ((a) => _annotationMatcher.hasMatch (a.name, assetId))) {
7372 return null ;
Original file line number Diff line number Diff line change 1+ library angular2.test.transform.directive_processor.abstract_classes.classes;
2+
3+ import 'package:angular2/angular2.dart' show Injectable;
4+
5+ @Injectable ()
6+ abstract class Service {
7+ factory Service (){
8+ return null ;
9+ }
10+ }
Original file line number Diff line number Diff line change @@ -280,6 +280,14 @@ void allTests() {
280280 });
281281 });
282282
283+ it ('should record information about abstract classes' ,
284+ () async {
285+ var model = (await _testCreateModel (
286+ 'abstract_classes/classes.dart' )).ngDeps;
287+
288+ expect (model.reflectables.first.name).toEqual ("Service" );
289+ });
290+
283291 it ('should not throw/hang on invalid urls' , () async {
284292 var logger = new RecordingLogger ();
285293 await _testCreateModel ('invalid_url_files/hello.dart' , logger: logger);
You can’t perform that action at this time.
0 commit comments