Commit Graph

19 Commits

Author SHA1 Message Date
Brian Ford aa85856e1c fix(router): set correct redirect/default URL from hashchange
Currently, hashchange events outside of Angular that cause navigation
do not take into account cases where the initial route URL changes
due to a redirect or a default route.

Closes #5590

Closes #5683
2015-12-08 22:34:19 +00:00
Tim Blasi 35e32bbea1 feat(mocks): Mark mock objects @Injectable()
Make mock objects `@Injectable()` to allow using them in compiled tests.

Closes #5576
2015-12-03 10:49:56 -08:00
Rob Wormald 3fa287aae2 refactor(EventEmitter): rename .next() to .emit()
BREAKING CHANGE:

EventEmitter#next(value) is deprecated, use EventEmitter#emit(value)
instead.

Closes #4287

Closes #5302
2015-11-18 22:16:40 +00:00
vsavkin 79472b77ca refactor(core): move facades out of core
This is part of ongoing work to make core platform-independent.

BREAKING CHANGE

All private exports from 'angular2/src/core/facade/{lang,collection,exception_handler}' should be replaced with 'angular2/src/facade/{lang,collection,exception_handler}'.
2015-11-07 01:36:06 +00:00
Rob Wormald ca3986f31d refactor(async): refactor EventEmitter
Refactor EventEmitter and Async Facade to match ES7 Observable semantics, properly use RxJS typedefs, make EventEmitter inherit from RxJS Subject. Closes #4149.

BREAKING CHANGE:
- consumers of EventEmitter no longer need to call .toRx()
- EventEmitter is now generic and requires a type - e.g. `EventEmitter<string>`
- EventEmitter and Observable now use the `.subscribe(generatorOrNext, error, complete)` method instead of `.observer(generator)`
- ObservableWrapper uses `callNext/callError/callComplete` instead of `callNext/callThrow/callReturn`
2015-10-29 23:06:16 +00:00
Brian Ford 2a3e11d32d fix(router): respect LocationStrategy when constructing hrefs in links
Note that this introduces more behavior for LocationStrategy which needs
yet more refactoring to test. See #4935.

Closes #4333
2015-10-27 10:45:49 +00:00
Alex Rickabaugh 2674eaca51 feat(router): Support unsubscription from Location by returning the subscription. 2015-10-26 21:35:18 +00:00
Brian Ford 8bc40d3f4d fix(router): properly read and serialize query params
This splits out `path` and `query` into separate params for `location.go`
and related methods so that we can handle them properly in both `PathLocationStrategy`
and `HashLocationStrategy`.

This handles the problem of not reading query params to populate `Location` on the
initial page load.

Closes #3957
Closes #4225
Closes #3784
2015-10-13 12:06:22 -07:00
Alex Eagle 867c08ac84 chore(typings): mark underscore methods @internal.
This allows TypeScript to produce an API surface which matches the Dart semantics.
I found these with:
gulp build.js.dev && find dist/js/dev/es5/angular2/src -name "*.d.ts" -exec grep -H -n '^ *_' {} \;

Closes #4638
2015-10-10 02:18:33 +00:00
Misko Hevery e916836261 chore(ts2dart): replace List with Array
Closes #3514
2015-08-31 21:32:10 +00:00
vsavkin 343dcfa0c0 refactor(tests): removed @IMPLEMENTS 2015-08-26 15:06:25 -07:00
Jeff Cross 8ed22ce6e7 chore: update all import paths 2015-08-25 15:33:23 -07: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
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
Alex Eagle de18da2a0d feat(build): require parameter types
Fixes #2833
2015-07-21 06:20:13 -07:00
Alex Eagle 44891996b5 fix(build): add missing return types now enforced by linter 2015-06-29 15:31:41 -07:00
Matias Niemelä 2d2ae9b8d8 feat(router): enforce usage of ... syntax for parent to child component routes 2015-06-19 20:54:45 -04: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
Jeff Cross ba07f39347 refactor(router): convert to typescript
Fixes #2001
2015-06-02 11:06:44 -07:00