Commit Graph

35 Commits

Author SHA1 Message Date
vsavkin 2dcf714d2b refactor(pipes): use Injector instead of pipe factories for pipe instantiation
BREAKING CHANGE
    - Pipe factories have been removed.
    - PIpe names to pipe implementations are 1-to-1  instead of 1-to-*

 Before:
     class DateFormatter {
         transform(date, args){}
     }

     class DateFormatterFactory {
       supporst(obj) { return true; }
       create(cdRef) { return new DateFormatter(); }
     }
     new Pipes({date: [new DateFormatterFactory()]})

After
    class DateFormatter {
      transform(date, args){}
    }
    new Pipes({date: DateFormatter})
2015-08-07 10:02:11 -07:00
vsavkin 106a28b8dc feat(refactor): replaced ObservablePipe and PromisePipe with AsyncPipe 2015-08-07 02:10:32 +00:00
Alex Eagle b4a062983b fix(dart): @proxy is a value, not a factory
Previously I added parens everywhere to make this @proxy() because our typing indicated
it was a function that returned a decorator, but this breaks dart. Instead, the typing needs
to be changed.

Fixes #3494
2015-08-06 10:02:49 -07:00
vsavkin 392de4af67 feat(pipes): replaces iterable and key value diffing pipes with services
BREAKING CHANGE:
    Directives that previously injected Pipes to get iterableDiff or keyvalueDiff, now should inject IterableDiffers and KeyValueDiffers.
2015-08-04 10:39:55 -07:00
Alex Eagle 3c58878b19 chore(build): Upgrade to TypeScript@1.5.3
This change also makes us compliant with 1.6.0-dev compiler,
so we can do some experiments with apps that use 1.6 features
and compile against Angular.

We should probably add a travis build for 1.6 so we stay compatible
with both versions.
2015-07-31 20:01:27 +00:00
vsavkin e744409cb9 feat(exception_handler): print originalException and originalStack for all exceptions 2015-07-24 15:45:26 -07:00
Alex Eagle de18da2a0d feat(build): require parameter types
Fixes #2833
2015-07-21 06:20:13 -07:00
vsavkin 4c8ea12903 feat(pipes): changed .append to .extend
BREAKING CHANGE:
    Pipes.append has been renamed into Pipes.extend.
    Pipes.extend prepends pipe factories instead of appending them.
2015-07-20 15:36:42 -07:00
Jeff Cross 1eebceab27 feat(pipes): add static append method to Pipes
This change allows creation of a new Pipes binding with new pipes appended
to pipes of an inherited Pipes instance.

Closes #2901
2015-07-10 15:42:57 -07:00
Jeff Cross 9a70f84e60 refactor(pipes): rename PipeRegistry to Pipes
BREAKING CHANGE:
    This change renames all instances of PipeRegistry to Pipes.
    As part of this change, the former "defaultPipes" export is
    now a Pipes instance, instead of a map. The map that was previously
    called "defaultPipes" no longer exists, but may be accessed via
    defaultPipes.config.
2015-07-10 15:42:56 -07:00
Jeff Cross 8b3efdf229 chore(pipes): rename pipe_registry.ts -> pipes.ts
This is its own commit so that tools have an easier time of preserving
history of the file, by keeping the diff between pipes.ts and
pipe_registry.ts minimal.

Also moved pipe_registry_spec.ts
2015-07-10 15:42:56 -07:00
Pouria Alimirzaei b716046b97 feat(pipes): add date pipe
Closes #2877
2015-07-09 15:00:14 -07:00
Pouria Alimirzaei 3143d188ae feat(pipes): add number (decimal, percent, currency) pipes 2015-07-09 14:59:57 -07:00
Pouria Alimirzaei 0b50258814 feat(pipes): add limitTo pipe 2015-07-01 13:36:01 -07:00
vsavkin 20a8f0dbe5 refactor(pipes): removed pipes from properties
BREAKING CHANGE:

This PR remove an ability to use pipes in the properties config. Instead, inject the pipe registry.
2015-06-19 16:56:52 -07:00
Martin Probst 941362014b feat: remove MapWrapper.clear().
It's the same in Dart and JavaScript.
2015-06-18 14:55:13 -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
Martin Probst f3d741854a fix: add types for ts2dart's façade handling.
... in many, many places.
2015-06-12 15:41:08 -07:00
Martin Probst a6e7123995 feat: adjust formatting for clang-format v1.0.19. 2015-06-12 09:51:57 -07:00
gdi2290 e77710a372 fix(JsonPipe): always transform to json
BREAKING CHANGE:

no longer cache ref
2015-06-08 16:22:04 -07:00
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
Jeff Cross 9d90128463 refactor(ChangeDetection): convert change detection tests to typescript 2015-05-28 10:01:30 -07:00
Marc Laval 661a04798e fix(test): adds longer timers for NgZone and PromisePipe tests (IE11)
Closes #2055
2015-05-22 13:30:49 +02:00
gdi2290 d61a0dfa22 test(ObservablePipe): onDestroy shouldn't throw 2015-05-22 12:31:46 +02:00
gdi2290 4afd2b4138 feat(PromisePipe): remove ref onDestroy 2015-05-20 14:00:57 -07:00
Victor Berchet 6ec5d5daaf refactor(async): extract timer related functions into a TimerWrapper 2015-05-20 07:47:46 +02:00
gdi2290 986038242a feat(change_detection): json pipe
Closes #1957
2015-05-18 14:34:37 -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
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
vsavkin e4586249fa refactor(change_detection): removed NO_CHANGED and replaced it with WrappedValue 2015-04-28 23:37:09 +00:00
Pawel Kozlowski d0059b5d75 refactor(PipeRegistry): improve error messages
Closes #1504
2015-04-23 11:04:30 -07:00
vsavkin a97a2266d3 feat(change_detection): added async pipe 2015-04-20 14:50:23 -07:00
vsavkin 2d929e73ec cleanup(change_detection): moved pipes-related tests to the pipes dir 2015-04-20 14:24:15 -07:00