86 Commits

Author SHA1 Message Date
vsavkin
c2bbda02a1 feat(change_detection): provide error context for change detection errors 2015-07-24 15:45:26 -07:00
Pascal Precht
bc21aa0124 refactor(di/injector): fixes typo in InjectorStrategy interface
Closes #3269
2015-07-24 15:36:27 -07:00
Alex Eagle
19d8b221b4 fix(typings): test our .d.ts with --noImplicitAny
This matches how DefinitelyTyped tests it, so we are
one step closer to publishing the same file we generate.

See #3195
2015-07-24 11:24:44 -07:00
vsavkin
5a86f85936 feat(di): added context to runtime DI errors 2015-07-22 14:22:46 -07:00
vsavkin
6f4a39c337 refactor(di): removed @Parent
BREAKING CHANGE
    The @Parent annotation has been removed. Use @Ancestor instead.
    @Parent was used to enforce a particular DOM structure (e.g., a pane component is a direct child of the tabs component).
    DI is not the right mechanism to do it. We should enforce it using schema instead.
2015-07-21 14:39:28 -07:00
Alex Eagle
de18da2a0d feat(build): require parameter types
Fixes #2833
2015-07-21 06:20:13 -07:00
vsavkin
2f08ed8d3e fix(di): fixed types 2015-07-17 13:04:34 -07:00
vsavkin
2147ce45c2 fix(di): do not rely on the fact that types are canonicalized 2015-07-16 15:19:18 -07:00
vsavkin
7531b48d02 fix(di): instatiate services lazily 2015-07-14 17:10:30 -07:00
vsavkin
04baa46efe fix(di): removed default visibility
BREAKING CHANGE:
    Directives will use the Unbounded visibility by default, whereas before the change they used Self
2015-07-13 16:00:07 -07:00
Martin Probst
3bf8c18c56 chore: run clang-format on code base.
This fixes several minor indentation issues (instanceof precendence,
type declaration specificity, template string length calculation).

This should also fix some flip-flop situations with template strings.
2015-07-12 18:50:52 +02:00
Peter Bacon Darwin
2e4a2a0e5a chore(doc-gen): remove unnecessary @public and @exportedAs tags 2015-07-11 07:21:46 +01:00
vsavkin
a6210466c7 fix(di): do not use exceptions to detect if reflection is enabled 2015-07-10 10:50:03 -07:00
vsavkin
0ed5dd0d7b fix(di): hostInjector and viewInjector support nested arrays 2015-07-09 15:03:38 -07:00
vsavkin
b54e7214f0 chore: removed angular2.api.ts
BREACKING CHANGE:

We export InjectMetadata instead of InjectAnnotation
2015-07-09 13:54:07 -07:00
vsavkin
569766fa8b refactor(di): added support for custom dep providers 2015-07-07 08:27:54 -07:00
vsavkin
d1393b0581 fix(di): injecting null causes a cyclic dependency 2015-07-01 17:08:45 -07:00
vsavkin
f0e962c55e feat(di): removed app injector
BREAKING CHANGE:

THe appInjector property has been removed. Instead use viewInjector or hostInjector.
2015-07-01 13:33:43 -07:00
Pawel Kozlowski
530e742628 refactor(injector): remove unused function
Closes #2815
2015-07-01 15:27:23 +02:00
Alex Eagle
44891996b5 fix(build): add missing return types now enforced by linter 2015-06-29 15:31:41 -07:00
vsavkin
eb0fd7967c feat(di): changed InstantiationError to print the original stack 2015-06-29 11:16:12 -07:00
vsavkin
22d3943831 refactor(di): unified di injector and core injector
BREAKING CHANGES:

* InjectAsync and InjectLazy have been removed
* toAsyncFactory has been removed
2015-06-26 15:59:18 -07:00
Martin Probst
dfd30910aa feat: remove MapWrapper.contains(). 2015-06-18 14:55:12 -07:00
Martin Probst
be7ac9fd41 feat: remove MapWrapper.create()/get()/set().
Better dart2js code, better Angular code.
2015-06-18 14:55:12 -07:00
Martin Probst
c7e48350d3 chore: kill ListWrapper.create() and .push().
These wrappers are not natively understood by
ts2dart. Removing them will improve Dart2JS
compilation due to fewer megamorphic calls to List
functions.

It also makes Angular code more succinct and
improves type safety in Angular due to better type
inference of the Array component type.

This change exposed several bugs in Angular.
2015-06-17 16:21:55 -07:00
Victor Berchet
ffd1ac425e style(DI): idiomatic TS 2015-06-17 11:22:16 +02:00
Victor Berchet
cdfb635737 refactor(facade): refactor type check function - is*() 2015-06-16 19:27:34 +02:00
Martin Probst
c4ecbf0a7f fix: rename FORWARD_REF to forwardRef in the Angular code base.
Now that ts2dart understands forwardRef, there's
no need to maintain the old syntax.
2015-06-12 15:41:08 -07:00
Misko Hevery
2ccc65d7fd fix: Improve error message on missing dependency 2015-06-10 16:40:38 -07:00
Naomi Black
b746e0c9f0 docs(docgen): tell dgeni to use ts files and fix some bad links 2015-06-02 15:30:03 -07:00
Victor Berchet
921fb9f2ce refactor(Injector): use TS iodioms 2015-06-02 09:53:11 +02:00
Victor Berchet
e93b5a1d5b refactor(Injector): add an interface for strategies 2015-06-02 09:53:11 +02:00
gdi2290
c571b2693e feat(OpaqueToken): now a const constructor
BREAKING CHANGE:

now a `const` constructor
2015-06-01 16:24:36 -07:00
vsavkin
d523613329 test(di): added a test verifying hierarchical injection 2015-05-29 15:52:46 -07:00
elimach
a80921b45d fix(binding): unbalanced curly brackets in documentation 2015-05-29 17:54:51 +02:00
Victor Berchet
ec2d8cc2c8 feat(binding): throw on binding to a blank alias
fixes #2068
2015-05-28 22:37:29 +02:00
Martin Probst
2c25055828 chore: reformat the code base using the clang-format 1.0.15. 2015-05-27 15:28:22 -07:00
vsavkin
df59e969cf chore(di): moved tests to typescript 2015-05-22 17:32:21 -07:00
Martin Probst
15f1eb28a2 fix(deps): Update clang-format to 1.0.14. 2015-05-22 09:39:15 -07:00
vsavkin
fed86fc8ac feat(injector): support forwardRef in toAlias 2015-05-21 09:52:43 -07:00
vsavkin
705ee46f31 fix(di): changed host and view injector to respect visibility 2015-05-21 09:17:56 -07:00
vsavkin
f210c41c1f feat(di): changed toFactory to support dependency annotations 2015-05-21 08:34:48 -07:00
Tobias Bosch
e61d82b9be refactor(core): ts’ify core 2015-05-20 16:30:41 -07:00
Tobias Bosch
8aa3fcfb63 chore(build): don’t include export var __esModule = true in every file
But do it during the build process for cjs.
Right now we only need this when we transpile from ts
directly to es5. This is only the case in our
cis build, as for our browser build we only transpile
from ts to es6 via ts and then use traceur to do
the rest.
2015-05-19 15:12:59 -07:00
Yegor Jbanov
8ab773538b fix(errors): require passing stack traces explicitly in ng2 own code 2015-05-19 12:48:00 -07:00
Peter Bacon Darwin
8b9400ad92 docs(di/injector): remove invalid tab chars
These tabs were breaking the jade syntax generation
2015-05-19 14:38:07 +01:00
vsavkin
b066b8d15a feat(di): added hostInjector and viewInjector to the Directive annotation 2015-05-18 18:30:53 -07:00
Victor Berchet
b033416a45 doc(DI): fix inline doc in binding.ts
fixes #1894
2015-05-18 23:10:41 +02:00
Misko Hevery
1eea2b254e feat: allow for forward references in injection
It is possible for a class defined first to be referencing a class defined later,
and as a result at the time of the definition it is not possible to access the later's
class reference. This allows to refer to the later defined class through
a closure.Closes #1891
2015-05-15 21:12:57 -07:00
yjbanov
358a6750ed feat(di): support type literals in DI 2015-05-12 10:57:53 -07:00