Skip to content

Commit b86829f

Browse files
committed
revert: feat(transformers): collect information about di dependencies and providers
This reverts commit 86c40f8. Reason: new issues were discovered during the g3sync. @vsavkin is working on fixing them.
1 parent 22929a1 commit b86829f

34 files changed

Lines changed: 172 additions & 995 deletions

File tree

modules/angular2/src/compiler/directive_metadata.ts

Lines changed: 14 additions & 258 deletions
Large diffs are not rendered by default.

modules/angular2/src/compiler/template_compiler.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ export class TemplateCompiler {
109109
hostProperties: directive.hostProperties,
110110
hostAttributes: directive.hostAttributes,
111111
lifecycleHooks: directive.lifecycleHooks,
112-
providers: directive.providers,
113112
template: normalizedTemplate
114113
}));
115114
}

modules/angular2/src/core/change_detection/change_detector_ref.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import {ChangeDetector} from './interfaces';
22
import {ChangeDetectionStrategy} from './constants';
3-
import {Injectable} from 'angular2/src/core/di';
43

5-
@Injectable()
64
export abstract class ChangeDetectorRef {
75
/**
86
* Marks all {@link ChangeDetectionStrategy#OnPush} ancestors as to be checked.

modules/angular2/src/core/linker/element_ref.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {unimplemented} from 'angular2/src/facade/exceptions';
2-
import {Injectable} from 'angular2/src/core/di';
32
import {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()
1614
export abstract class ElementRef {
1715
/**
1816
* The underlying native element or `null` if direct access to native elements is not supported

modules/angular2/src/core/linker/template_ref.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {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()
1715
export abstract class TemplateRef {
1816
/**
1917
* The location in the View where the Embedded View logically belongs to.

modules/angular2/src/core/linker/view_container_ref.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {ListWrapper} from 'angular2/src/facade/collection';
22
import {unimplemented} from 'angular2/src/facade/exceptions';
3-
import {ResolvedProvider, Injectable} from 'angular2/src/core/di';
3+
import {ResolvedProvider} from 'angular2/src/core/di';
44
import {isPresent, isBlank} from 'angular2/src/facade/lang';
55

66
import {AppElement} from './element';
@@ -36,7 +36,6 @@ import {
3636
*
3737
* <!-- TODO(i): we are also considering ElementRef#viewContainer api -->
3838
*/
39-
@Injectable()
4039
export abstract class ViewContainerRef {
4140
/**
4241
* Anchor element that specifies the location of this container in the containing View.

modules/angular2/src/core/render/api.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
2-
import {Injector, Injectable} from 'angular2/src/core/di';
2+
import {Injector} from 'angular2/src/core/di/injector';
33

44
export class RenderComponentType {
55
constructor(public id: string, public encapsulation: ViewEncapsulation,
@@ -13,7 +13,6 @@ export class RenderDebugInfo {
1313

1414
export interface ParentRenderer { renderComponent(componentType: RenderComponentType): Renderer; }
1515

16-
@Injectable()
1716
export abstract class Renderer implements ParentRenderer {
1817
abstract renderComponent(componentType: RenderComponentType): Renderer;
1918

modules/angular2/src/router/instruction.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {Map, MapWrapper, StringMapWrapper, ListWrapper} from 'angular2/src/facade/collection';
22
import {isPresent, isBlank, normalizeBlank, Type, CONST_EXPR} from 'angular2/src/facade/lang';
33
import {Promise, PromiseWrapper} from 'angular2/src/facade/async';
4-
import {Injectable} from 'angular2/core';
54

65

76
/**
@@ -34,7 +33,6 @@ import {Injectable} from 'angular2/core';
3433
* bootstrap(AppCmp, ROUTER_PROVIDERS);
3534
* ```
3635
*/
37-
@Injectable()
3836
export class RouteParams {
3937
constructor(public params: {[key: string]: string}) {}
4038

modules/angular2/src/router/router.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ let _resolveToFalse = PromiseWrapper.resolve(false);
3434
* `Instruction`.
3535
* The router uses the `RouteRegistry` to get an `Instruction`.
3636
*/
37-
@Injectable()
3837
export class Router {
3938
navigating: boolean = false;
4039
lastNavigationAttempt: string;

modules/angular2/test/compiler/directive_metadata_spec.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import {
1515
import {
1616
CompileDirectiveMetadata,
1717
CompileTypeMetadata,
18-
CompileTemplateMetadata,
19-
CompileProviderMetadata
18+
CompileTemplateMetadata
2019
} from 'angular2/src/compiler/directive_metadata';
2120
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
2221
import {ChangeDetectionStrategy} from 'angular2/src/core/change_detection';
@@ -29,8 +28,8 @@ export function main() {
2928
var fullDirectiveMeta: CompileDirectiveMetadata;
3029

3130
beforeEach(() => {
32-
fullTypeMeta = new CompileTypeMetadata(
33-
{name: 'SomeType', moduleUrl: 'someUrl', isHost: true, diDeps: []});
31+
fullTypeMeta =
32+
new CompileTypeMetadata({name: 'SomeType', moduleUrl: 'someUrl', isHost: true});
3433
fullTemplateMeta = new CompileTemplateMetadata({
3534
encapsulation: ViewEncapsulation.Emulated,
3635
template: '<a></a>',
@@ -49,8 +48,7 @@ export function main() {
4948
inputs: ['someProp'],
5049
outputs: ['someEvent'],
5150
host: {'(event1)': 'handler1', '[prop1]': 'expr1', 'attr1': 'attrValue2'},
52-
lifecycleHooks: [LifecycleHooks.OnChanges],
53-
providers: [new CompileProviderMetadata({token: 'token', useClass: fullTypeMeta})]
51+
lifecycleHooks: [LifecycleHooks.OnChanges]
5452
});
5553

5654
});

0 commit comments

Comments
 (0)