43 Commits

Author SHA1 Message Date
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
vsavkin
a9ce0f7afb cleanup(di): use typescript initialization idioms 2015-05-11 12:34:22 -07:00
Kevin Moore
7844e3a275 chore: dartfmt Dart code in the repo 2015-05-11 09:50:33 -07:00
yjbanov
2185e7cee9 feat(di): expose parent injector 2015-05-08 17:11:27 -07:00
Kevin Western
42f6baeaec Fix documentation for toFactory and toAsyncFactory
The bound String classes should have a dependency on Number, not String.

Closes #1654
2015-05-08 13:40:12 -07:00
vsavkin
fa28b28d0a build(typescript): Migrated change detection to typescript 2015-05-07 17:18:04 -07:00
vsavkin
cb87fa0970 chore(build): migrated di to TypeScript 2015-05-06 19:00:56 -07:00
Rado Kirov
457c15cd6c feat(decorators): adds decorator versions of DI annotations.
In 'angular2/di' the symbol:
- Inject is a decorator
- InjectAnnotation is an annotation

Internally one an get a hold of annotations without *Annotations appened
(to make ts2dart work without workarounds) by importing from
'angular2/src/di/annotations_impl' instead of 'angular2/di'. This is
needed only for users that transpile through TS and through ts2dart.
2015-05-04 13:35:09 -07:00
Pawel Kozlowski
ee1b574baf fix(di): improve error messages for invalid bindings
Fixes #1515

Closes #1573
2015-04-28 23:42:36 +00:00
Peter Bacon Darwin
7fb2f2069c docs(Injector): remove unwanted tab characters in the examples
These mess up the jade templates that use tabs for structuring the output.
2015-04-28 14:31:35 +01:00
vsavkin
8ccafb0524 feat(view): reimplemented property setters using change detection 2015-04-23 11:55:27 -07:00
vsavkin
d74dd1126b cleanup(di): removed dead code 2015-04-22 14:48:53 -07:00
Kevin Moore
f7f06c5ad4 chore: add more type annotations 2015-04-21 08:49:05 -07:00
Pawel Kozlowski
e23004df52 fix(di): capture original exception in InvalidBindingError
Fixes #1406

Closes #1459
2015-04-21 10:59:44 +02:00
Naomi Black
5c25248582 docs(x-ref links): Change links to use dgeni syntax
Closes #1440
2015-04-20 18:45:04 +00:00
Misko Hevery
447018b54b docs: change primordial injector to platform injector 2015-04-20 16:45:23 +00:00
Pawel Kozlowski
5a095bb257 refactor(di): rename ProviderError to BindingError
Closes #1428
2015-04-17 20:17:51 +02:00
Naomi Black
de31aca7a7 docs(di): Edits to DI.
Closes #1420
2015-04-17 17:49:12 +00:00
Misko Hevery
87ac100c66 docs: add DI to public docs 2015-04-17 03:56:17 +00:00
vsavkin
97fc248e00 cleanup(di): changed an error message to be more descriptive 2015-04-16 11:06:20 -07:00
Yegor Jbanov
3667854a8f refactor(di): move all binding resolution logic into injector.js 2015-04-13 15:06:44 -07:00
Yegor Jbanov
c5c1c9e38e feat(docs): more docs on binding resolution 2015-04-13 15:06:44 -07:00
Yegor Jbanov
308823b6ea perf(view): use pre-resolved bindings for child injector init
Creating a child injector from pre-resolved bindings (if any) is an
order of magnitude faster.
2015-04-13 15:06:44 -07:00
Yegor Jbanov
4a961f4ecb feat(di): provide two ways to create an injector, resolved and unresolved
Add two factory static functions to Injector: resolveAndCreate and
fromResolvedBindings.

We want to avoid resolution and flattening every time we create a new
injector. This commit allows the user to cache resolved bindings and
reuse them.
2015-04-13 15:06:43 -07:00
Yegor Jbanov
6c8398df9b fix(di): refactor bindings to support Dart annotations 2015-04-13 15:06:43 -07:00
Pawel Kozlowski
a3387b7f48 fix(di): allow injecting static attrs without type annotations
Closes #1226
2015-04-06 12:33:37 +02:00
Pawel Kozlowski
ae30d7ba40 fix(di): allow injecting event emitter fns without specifying type annotation
Fixes #965

Closes #1155
2015-04-02 19:07:49 +02:00
Marc Laval
b1dc6239ef feat(core): @Attribute annotation
Closes #1091
Fixes #622
2015-03-26 10:51:44 +01:00
Tim Blasi
b656f63430 feat(di): Add the @Injectable annotation
Add an annotation marking a class as available to `Injector`s.
2015-03-17 22:12:47 -07:00
Victor Berchet
7322ed721e refactor: remove reference to the FIELD class 2015-03-13 18:59:51 +01:00
Victor Berchet
a82e20889d feat(Injector): Support binding to null 2015-03-12 19:52:08 +01:00
vsavkin
ba0a1ec459 feat(di): add support for optional dependencies 2015-03-02 14:38:02 -08:00
Pawel Kozlowski
0c4fbfc8e2 feat(di): introduce aliasing
Closes #710
Closes #747
2015-02-21 18:43:45 +01:00
Tobias Bosch
f6284f2a55 feat(benchpress): rewritten implementation
Limitations:
- cloud reporter is not yet supported any more
2015-02-16 11:43:27 -08:00
Tobias Bosch
f39c6dc2c7 fix(setup): use upstream traceur with explicit patches
Also correct the transpile to ES6

Also support generics correctly

All patches are hooked in via `/tools/transpiler/index.js`
https://github.com/google/traceur-compiler/issues/1700
https://github.com/google/traceur-compiler/issues/1699
https://github.com/google/traceur-compiler/issues/1708
https://github.com/google/traceur-compiler/issues/1625
https://github.com/google/traceur-compiler/issues/1706
2015-02-06 17:04:08 -08:00
Yegor Jbanov
3f228669d7 chore(packaging): update import for the new file structure 2015-02-05 15:47:12 -08:00
Yegor Jbanov
3820609f24 chore(packaging): move files to match target file structure 2015-02-05 15:46:13 -08:00