X Tutup
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 0 additions & 2 deletions modules/angular2/src/core/linker/element_ref.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {unimplemented} from 'angular2/src/facade/exceptions';
import {Injectable} from 'angular2/src/core/di';
import {AppElement} from './element';

/**
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions modules/angular2/src/core/linker/template_ref.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.
Expand Down
1 change: 0 additions & 1 deletion modules/angular2/src/core/linker/view_container_ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import {
*
* <!-- TODO(i): we are also considering ElementRef#viewContainer api -->
*/
@Injectable()
export abstract class ViewContainerRef {
/**
* Anchor element that specifies the location of this container in the containing View.
Expand Down
1 change: 0 additions & 1 deletion modules/angular2/src/core/render/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class ReflectionInfoVisitor extends RecursiveAstVisitor<ReflectionInfoModel> {

@override
ReflectionInfoModel visitClassDeclaration(ClassDeclaration node) {
if (node.isAbstract) return null;
if (!node.metadata
.any((a) => _annotationMatcher.hasMatch(a.name, assetId))) {
return null;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
X Tutup