101 Commits

Author SHA1 Message Date
Martin Probst
f999d5a156 chore: move to clang-format 1.0.17.
clang-format 1.0.17 substantially improves formatting for fat arrow functions
and array literal detection. It also fixes a number of minor formatting issues.
2015-06-03 15:27:27 -07:00
Tim Blasi
8a3b0b366f feat(dart/transform): Generate ChangeDetector classes
Use the `ProtoViewDto` created by the render `Compiler` to create a
`ChangeDetectorDefinition`.

From there, generate a subclass of `AbstractChangeDetector` for each
`ChangeDetectorDefinition`.

Run some basic unit tests for the dynamic and JIT change detectors on
pre-generated change detectors.
2015-05-29 14:48:53 -07:00
Victor Berchet
0387221da8 fix(ast): fix the size of a list in _evalListCache 2015-05-29 08:07:43 +02:00
vsavkin
c39c8ebcd0 feat(change_detection): added onInit and onCheck hooks 2015-05-28 16:46:22 -07:00
Victor Berchet
a9be2ebf1b feat: add support for the safe navigation (aka Elvis) operator
fixes #791
2015-05-28 23:03:30 +02:00
Tim Blasi
a2770c8a52 refactor(change_detect): Flatten Js change detector template
Update the `ChangeDetectionJITGenerator` for clarity and similarity with
the upcoming Dart generated `ChangeDetector` classes.
2015-05-27 11:50:25 -07:00
Victor Berchet
26d5d17ebe style: fix clang-format glitches 2015-05-26 21:00:44 +02:00
Naomi Black
f6cd26b0a6 docs(docgen): fixed a typo that was breaking dgeni 2015-05-22 21:47:34 -07:00
Tobias Bosch
aec51d616b refactor(ts'ify): ts’ify mocks, directives and test_lib
Also cleans up global types.
2015-05-21 15:33:37 -07:00
Tobias Bosch
e61d82b9be refactor(core): ts’ify core 2015-05-20 16:30:41 -07:00
gdi2290
4afd2b4138 feat(PromisePipe): remove ref onDestroy 2015-05-20 14:00:57 -07:00
Misko Hevery
a664f5a6de fix: don't call onAllChangesDone on checkNoChanges 2015-05-20 08:27:48 +02:00
Victor Berchet
0ae89ac096 feat(CD): add support for === and !==
relates to #1500
2015-05-20 07:50:43 +02: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
gdi2290
f9fd4926ef docs(pipes): fix @View
we all copy/pasta ObservablePipe which had the typo

Closes #1958
2015-05-18 14:34:37 -07:00
gdi2290
986038242a feat(change_detection): json pipe
Closes #1957
2015-05-18 14:34:37 -07:00
Tim Blasi
edfbc25768 style(change detect): Fix typo unitialized => uninitialized
Closes #1928
2015-05-18 14:34:37 -07:00
Tim Blasi
05a1c6c183 perf(compiler): Avoid unnecessary List concats
Update `BindingRecordsCreator#getBindingRecords` and `ProtoRecordBuilder#addAst`
to avoid unnecessary calls to `ListWrapper.concat`.

Closes #1905
2015-05-18 14:34:36 -07:00
gdi2290
7a4a635399 feat(change_detection): uppercase and lowercase pipes
because the world needs more uppercase madness

[✔] clang-format
[✔] tests
2015-05-15 19:46:52 +02:00
PatrickJS
8ad0205948 docs(promise_pipe.ts): correct "async" pipe
the syntax is now combined with `|async` rather than separate `|promise`
2015-05-14 17:25:46 +02:00
Tobias Bosch
ecb068019b refactor(proto_view_factory): expose data for generating change detectors
Also consolidates metadata handling in `ElementInjector`

BREAKING CHANGE:
- renames `DirectiveMetadataReader` into `DirectiveResolver`
  and removes `src/core/compiler/directive_metadata`.

Fixes #1712
Fixes #1713
2015-05-13 17:11:59 -07:00
vsavkin
08f21dbf51 feat(change_detection): implemented change detection that can be configured with pregenerated change detectors 2015-05-13 16:23:22 -07:00
vsavkin
d8c7c274e4 refactor(change_detector): extracted ChangeDetectorDefinition 2015-05-13 16:23:22 -07:00
Misko Hevery
111fa60a93 chore: rename for to ng-for
Closes #1598
Closes #1295
Closes #1827

Closes #1827
2015-05-12 15:32:44 -07:00
Jeff Cross
96b0a1c75e refactor(PromisePipe): use lexical this inside of transform 2015-05-12 12:40:13 -07:00
Jeff Cross
5691063ba0 refactor(ChangeDetection): rename AsyncPipe to ObservablePipe
The async pipe in templates will now delegate to both Observable pipe or Promise pipe,
whichever first says it can support the input. Therefore, it's beneficial to disambiguate
the name of the AsyncPipe/AsyncPipeFactory constructors to reflect that these actually
support only Observables.
2015-05-11 14:25:27 -07:00
Jeff Cross
7498758584 feat(PromisePipe): add pipe for promises 2015-05-11 14:23:46 -07:00
Kevin Moore
7844e3a275 chore: dartfmt Dart code in the repo 2015-05-11 09:50:33 -07:00
vsavkin
d717529e9a fix(change_detection): updated dynamic change detector not to mutate when throwing
Closes #1762
2015-05-08 10:46:08 -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
Kevin Moore
75db2c5241 chore: add more types to a number of top-level properties and methods 2015-05-06 17:53:44 -07:00
Kevin Moore
f5b56c627b refactor: add types to top-level fields in change_detection
Also introduced an abstract PipeFactory base class
2015-05-05 10:21: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
vsavkin
ce6a2ba836 refactor(view): moved the logic from ProtoView to ProtoViewFactory 2015-05-01 13:35:17 -07:00
Pawel Kozlowski
d2d4e7d783 refactor(parser): remove unused variables
Closes #1553
2015-04-29 04:08:42 +00:00
Matteo Suppo
d4925b61ff fix(change_detector): ensure that locals are only used when implicit receiver
closes #1542
2015-04-28 23:40:22 +00:00
vsavkin
e4586249fa refactor(change_detection): removed NO_CHANGED and replaced it with WrappedValue 2015-04-28 23:37:09 +00:00
Naomi Black
6ab19dd095 docs(change_detection): document JitChangeDetection and DynamicChangeDetection
closes #1446
2015-04-27 15:34:40 -07:00
vsavkin
8ccafb0524 feat(view): reimplemented property setters using change detection 2015-04-23 11:55:27 -07:00
Pawel Kozlowski
d0059b5d75 refactor(PipeRegistry): improve error messages
Closes #1504
2015-04-23 11:04:30 -07:00
Pawel Kozlowski
fa8e059f28 refacor(lexer): remove unused ~/ operator
Closes #1509
2015-04-23 11:04:30 -07:00
Pawel Kozlowski
afe0e45453 feat(parser): support === and !== operators
Closes #1496

Closes #1500
2015-04-23 20:01:31 +02:00
Kevin Moore
f7f06c5ad4 chore: add more type annotations 2015-04-21 08:49:05 -07:00
vsavkin
a97a2266d3 feat(change_detection): added async pipe 2015-04-20 14:50:23 -07: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
vsavkin
5408abca68 refactor(change_detection): removed global change detection objects so it is possible to override pipe registry 2015-04-16 15:57:45 -07:00
vsavkin
7bd682bb27 feat(parser): changed parser to parse pipes in the middle of a binding 2015-04-16 10:39:03 -07:00
vsavkin
68faddbf5c feat(change_detection): updated handling ON_PUSH detectors so they get notified when their bindings change 2015-04-15 16:21:21 -07:00