chore: removed angular2.api.ts

BREACKING CHANGE:

We export InjectMetadata instead of InjectAnnotation
This commit is contained in:
vsavkin
2015-07-08 12:04:24 -07:00
parent d6dadc6efc
commit b54e7214f0
25 changed files with 254 additions and 208 deletions

View File

@ -40,8 +40,7 @@ import {
Directive,
onDestroy
} from 'angular2/annotations';
import {bind, Injector, Binding, resolveBindings, Optional, Inject, Injectable, Self, Parent, Ancestor, Unbounded, self} from 'angular2/di';
import * as diAnn from 'angular2/src/di/annotations_impl';
import {bind, Injector, Binding, resolveBindings, Optional, Inject, Injectable, Self, Parent, Ancestor, Unbounded, self, InjectMetadata, ParentMetadata} from 'angular2/di';
import {AppProtoView, AppView} from 'angular2/src/core/compiler/view';
import {ViewContainerRef} from 'angular2/src/core/compiler/view_container_ref';
import {ProtoViewRef} from 'angular2/src/core/compiler/view_ref';
@ -595,7 +594,7 @@ export function main() {
bind('injectable2')
.toFactory(
(val) => `${val}-injectable2`,
[[new diAnn.Inject('injectable1'), new diAnn.Parent()]])
[[new InjectMetadata('injectable1'), new ParentMetadata()]])
]
}))]);
expect(childInj.get('injectable2')).toEqual('injectable1-injectable2');

View File

@ -43,7 +43,8 @@ import {
Inject,
Parent,
Ancestor,
Unbounded
Unbounded,
UnboundedMetadata
} from 'angular2/di';
import {
PipeFactory,
@ -58,7 +59,6 @@ import {
import {Directive, Component, View, Attribute, Query} from 'angular2/annotations';
import * as viewAnn from 'angular2/src/core/annotations_impl/view';
import * as visAnn from 'angular2/src/di/annotations_impl';
import {QueryList} from 'angular2/src/core/compiler/query_list';
@ -1779,7 +1779,7 @@ function createParentBus(peb) {
selector: 'parent-providing-event-bus',
hostInjector: [
new Binding(EventBus,
{toFactory: createParentBus, deps: [[EventBus, new visAnn.Unbounded()]]})
{toFactory: createParentBus, deps: [[EventBus, new UnboundedMetadata()]]})
]
})
@View({