Commit Graph

65 Commits

Author SHA1 Message Date
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
Matias Niemelä 7bf7ec6d9c fix(router): ensure navigation via back button works
The router will now navigate and respect the current address value
accordingly whenever a popState event is handled.

Closes #2201
2015-08-03 22:24:57 +00:00
Matias Niemelä 60f38eab78 feat(router): add `back()` support to `MockLocationStrategy` 2015-08-03 22:24:57 +00:00
Marc Laval 8822460858 chore(browsers): fix failing tests in Firefox
Closes #3386
2015-08-03 12:17:44 +02:00
Misko Hevery 39b0286d6b fix: remove unused imports 2015-07-31 20:40:33 +00: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
Tobias Bosch 16e3d7e96e refactor(shadow_dom): remove `ShadowDomStrategy` in favor of `@View(encapsulation)`
BREAKING CHANGES:
- `ShadowDomStrategy` was removed. To specify the encapsulation of a component use `@View(encapsulation: ViewEncapsulation.NONE | ViewEncapsulation.EMULATED | ViewEncapsulation.NATIVE)`
- The default encapsulation strategy is now `ViewEncapsulation.EMULATED` if a component contains styles and `ViewEncapsulation.NONE` if it does not. Before this was always `NONE`.
- `ViewLoader` now returns the template as a string and the styles as a separate array
2015-07-28 22:33:11 -07:00
Tim Blasi 2c9951273a style(dart): Run dartfmt v0.1.8+2 on all pure Dart code
Update formatting for all pure Dart code in the repo.
2015-07-28 12:44:03 -07:00
Jason Teplitz 7cbaf1076f refactor(Async): Unify TS and Dart PromiseCompleter naming
Also add explicit typing wherever we use PromiseCompleter
2015-07-27 10:28:07 -07:00
vsavkin e744409cb9 feat(exception_handler): print originalException and originalStack for all exceptions 2015-07-24 15:45:26 -07:00
yjbanov 3531bb7118 feat(bootstrap): remove the need for explicit reflection setup in bootstrap code
BREAKING CHANGES:

Dart applications and TypeScript applications meant to transpile to Dart must now
import `package:angular2/bootstrap.dart` instead of `package:angular2/angular2.dart`
in their bootstrap code. `package:angular2/angular2.dart` no longer export the
bootstrap function. The transformer rewrites imports of `bootstrap.dart` and calls
to `bootstrap` to `bootstrap_static.dart` and `bootstrapStatic` respectively.
2015-07-22 17:02:32 -07:00
Matias Niemelä fdffcaba9b feat(router): use querystring params for top-level routes
Closes #3017
2015-07-22 14:40:55 -07:00
Matias Niemelä 476988876c test(router): refactor integration tests to use TestComponentBuilder
Closes #3182
2015-07-21 20:40:42 -07:00
Alex Eagle de18da2a0d feat(build): require parameter types
Fixes #2833
2015-07-21 06:20:13 -07:00
Brian Ford 011fab37af fix(router): improve error for missing base href
Closes #3096
2015-07-17 14:00:04 -07:00
Brian Ford c6409cb624 fix(router): throw when reserved characters used in route definition
Closes #3021
2015-07-17 10:51:23 -07:00
Brian Ford 4d28167bc0 feat(router): add interfaces for route definitions in RouteConfig
Closes #2261
2015-07-16 16:36:22 -07:00
Tobias Bosch b1df54501a feat(compiler): attach components and project light dom during compilation.
Closes #2529

BREAKING CHANGES:
- shadow dom emulation no longer
  supports the `<content>` tag. Use the new `<ng-content>` instead
  (works with all shadow dom strategies).
- removed `DomRenderer.setViewRootNodes` and `AppViewManager.getComponentView`
  -> use `DomRenderer.getNativeElementSync(elementRef)` and change shadow dom directly
- the `Renderer` interface has changed:
  * `createView` now also has to support sub views
  * the notion of a container has been removed. Instead, the renderer has
    to implement methods to attach views next to elements or other views.
  * a RenderView now contains multiple RenderFragments. Fragments
    are used to move DOM nodes around.

Internal changes / design changes:
- Introduce notion of view fragments on render side
- DomProtoViews and DomViews on render side are merged,
  AppProtoViews are not merged, AppViews are partially merged
  (they share arrays with the other merged AppViews but we keep
  individual AppView instances for now).
- DomProtoViews always have a `<template>` element as root
  * needed for storing subviews
  * we have less chunks of DOM to clone now
- remove fake ElementBinder / Bound element for root text bindings
  and model them explicitly. This removes a lot of special cases we had!
- AppView shares data with nested component views
- some methods in AppViewManager (create, hydrate, dehydrate) are iterative now
  * now possible as we have all child AppViews / ElementRefs already in an array!
2015-07-15 20:23:27 -07:00
Brian Ford 8bdca5c03e fix(router): improve error messages for routes with no config
Closes #2323
2015-07-15 10:28:25 -07:00
Matias Niemelä 5677bf73ca feat(router): introduce matrix params
Closes #2774
Closes #2989
2015-07-13 17:15:13 -07:00
Brian Ford a9a552c112 feat(router): lifecycle hooks
Closes #2640
2015-07-13 09:12:15 -07:00
Brian Ford 286a249a9a feat(router): support deep-linking to siblings
Closes #2807
2015-07-07 14:54:59 -07:00
Brian Ford d828664d0c fix(router): allow generating links with numeric params 2015-07-07 14:54:59 -07:00
Igor Minar d5ace7a562 test(route_link): add missing unit tests 2015-07-02 23:21:33 -07:00
Brian Ford f66ce096d8 feat(router): support deep-linking to anywhere in the app
Closes #2642
2015-06-30 17:21:50 -07:00
Julie Ralph 66d0e4e656 chore(test): migrate router tests to TestComponentBuilder
Part of #2354
2015-06-29 10:58:39 -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
Brian Ford e5de1f771a refactor(router): refactor BrowserLocation into LocationStrategy
This makes it easy to mock browser location and paves the way to
implementing hash routing.
2015-06-22 16:14:24 -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
Brian Ford cab1d0ef0f feat(router): allow configuring app base href via token 2015-06-15 18:04:09 -07:00
Matias Niemelä 73d152506b fix(router): ensure that root URL redirect doesn't redirect non-root URLs
Closes #2221
2015-06-15 10:48:47 -07:00
Brian Ford 5782f063f1 fix(router): rethrow exceptions
Closes #2391
2015-06-12 18:27:00 -07:00
Matias Niemelä cdc7b03e67 fix(router): avoid two slash values between the baseHref and the path 2015-06-12 15:23:29 -07:00
Matias Niemelä e372cc779d fix(router): do not prepend the root URL with a starting slash 2015-06-12 15:23:29 -07:00
Martin Probst a6e7123995 feat: adjust formatting for clang-format v1.0.19. 2015-06-12 09:51:57 -07:00
Brian Ford cd95e078fe feat(router): add routing to async components
Note that this also removes the `components` option from `RouteConfig`.
This functionality will be reintroduced with the more general `//` routing.
See #2329 for more details.
2015-06-08 15:49:56 -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 ba07f39347 refactor(router): convert to typescript
Fixes #2001
2015-06-02 11:06:44 -07:00
Marc Laval 2287938f5a fix(router): event.defaultPrevented is not reliable (IE11) 2015-05-22 13:30:44 +02:00
Rado Kirov c45283216f fix(router): router link should navigate to non-base Url.
While still displaying full base + custom part of url in the href.
2015-05-20 11:01:09 -07:00
Brian Ford 791caf0037 fix(router): use appRootComponentToken to get root route configs
Closes #1947
2015-05-19 14:36:45 -07:00
Brian Ford 5db89071d4 fix(router): improve route matching priorities 2015-05-18 15:57:08 -07:00
Brian Ford c29ab86d85 refactor(router): improve control flow of descendant route activation 2015-05-18 15:57:08 -07:00
Brian Ford 6b02cb9b44 test(router): rename helpers in test 2015-05-18 15:57:08 -07: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
Brian Ford 390cfb793b fix(router): generate links for router-link with baseHref 2015-05-13 12:22:45 -07:00
Brian Ford 17392f663f fix(router): sort possible routes by cost 2015-05-13 11:57:57 -07:00
Rado Kirov a574154108 fix(router): add baseUrl to relative paths, but not absolute.
Closes #1783
2015-05-11 18:55:24 -07:00
Brian Ford ac80df0959 fix(router): reuse common parent components 2015-05-11 15:49:40 -07:00
Rado Kirov 77d1fc149a fix(router): router-link works without params
Router-link attaches a listener to prevent default behavior and
navigate.

Closes: 1689
2015-05-11 11:58:38 -07:00