Commit Graph

753 Commits

Author SHA1 Message Date
Tim Blasi 40a3cd2ab1 style(dart/transform): Do not format generated code by default
Formatting code requires time and memory during the build -- do not do
it unless explicitly requested via a parameter to the transformer.

Add an entry to the
[wiki](https://github.com/angular/angular/wiki/Angular-2-Dart-Transformer)
describing the added parameter.
2015-08-06 23:32:01 +00:00
Tim Blasi 3db0ae1dac refactor(dart/transform): Show friendly messages for transform failures
Previously, the error messages coming out of the Dart transformer were
opaque when those errors came from the analyzer (for example, analyzer
parse errors). Log more useful errors when they are caught by the
transform code.
2015-08-06 22:28:10 +00:00
vsavkin 07b9be798c fix(exception_handler): log errors that are thrown by the compiler 2015-08-06 15:26:24 -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
Tim Blasi f11f4e0b45 style(dart): Format with dartfmt v0.2.0
Format all pure Dart code with package:dart_style v0.2.0

Command:
```
find -type f -name "*.dart" | xargs dartformat -w
```
2015-08-05 11:04:29 -07:00
Marc Laval 166688348a chore(browsers): fix failing tests in IE11
Closes #3388
2015-08-04 22:45:46 +02:00
Pascal Precht 39ad50657e refactor(di/tests): removes unecessary for-loop
Closes #3268
2015-08-04 20:14:04 +00:00
Martin Probst 861be30021 feat: export a proper promise type.
Promise used to be typed as any, giving incorrect results. This change
fixes places that were incorrectly typed and re-exports the actual
Promise type from es6-promise.

It also fixes a series of compilation errors discovered/triggered by
this change.
2015-08-04 19:56:02 +00:00
Tim Blasi c58b0ff787 refactor(change_detect): Share more codegen logic
Move more logic in our codegen into a shared util which is called by the
Jit & Prege change detector code.
2015-08-04 18:55:07 +00: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
Jeremy Elbourn c20a5d65d8 fix(compiler): Allow components to use any style of selector. Fixes #1602 2015-08-04 09:34:03 -07:00
Pawel Kozlowski 4422819754 fix(parser): detect empty expression in strings to interpolate
Fixes #3412

Closes #3451
2015-08-04 08:44:14 +02:00
gdi2290 cfedc77ce1 test(XHRConnection): normalize responseText and response
normalize xhr.responseText and xhr.response

- [x] Tests

Closes #2882
2015-08-04 00:39:11 +00:00
gdi2290 96eefdfebc fix(XHRConnection): use xhr status code
closes #2841

- [x] Tests
2015-08-04 00:39:11 +00: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 77875a270d feat: implement web-tracing-framework support
This includes implementation and minimal instrumentation

Closes #2610
2015-07-31 23:04:05 +00:00
Misko Hevery 39b0286d6b fix: remove unused imports 2015-07-31 20:40:33 +00:00
vsavkin 3437d56904 feat(core): made directives shadow native element properties
BREAKING CHANGE
    Previously, if an element had a property, Angular would update that property even if there was a directive placed on the same element with the same property. Now, the directive would have to explicitly update the native elmement by either using hostProperties or the renderer.
2015-07-31 20:29:57 +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
Jason Teplitz c5cb7009ca feat(WebWorkers): Add WebWorker Todo Example. Add support for more DOM events.
Fixed breakage caused by previous DI commit in WebWorker Todo example
2015-07-31 19:48:18 +00:00
vsavkin adc27398fd perf(change_detection): do not generate onAllChangesDone when not needed 2015-07-31 19:23:00 +00:00
Tobias Bosch dd06a871b7 fix(render): allow to configure when templates are serialized to strings
Introduces the injectable `TemplateCloner` that can be configured via the new token `MAX_IN_MEMORY_ELEMENTS_PER_TEMPLATE_TOKEN`.

Also replaces `document.adoptNode` with `document.importNode` as otherwise
custom elements are not triggered in chrome 43.

Closes #3418
Closes #3433
2015-07-31 12:04:32 -07:00
Tobias Bosch 014b6cb397 Revert "feat(WebWorkers): Add WebWorker Todo Example. Add support for more DOM events."
This reverts commit d44827a4c5.

This broke master due to a race condition in our presubmit queue.
2015-07-31 11:40:15 -07:00
Jason Teplitz d44827a4c5 feat(WebWorkers): Add WebWorker Todo Example. Add support for more DOM events. 2015-07-31 18:33:12 +00:00
vsavkin 3cda7128d0 cleanup(di): renamed viewInjector and hostInjector
BREAKING CHANGE
    Replace viewInjector with viewBindings
    Replace hostInjector with bindings
2015-07-31 09:49:51 -07:00
Pawel Kozlowski 0a40024995 test(integration): minor tests cleanup
Closes #3329
2015-07-31 10:52:42 +02:00
vsavkin 985627bd65 cleanup(DI): clean up visibility decorators
BREAKING CHANGE:
    Replace @Ancestor() with @Host() @SkipSelf()
    Replace @Unbounded() wwith @SkipSelf()
    Replace @Ancestor({self:true}) with @Host()
    Replace @Unbounded({self:true}) with nothing
    Replace new AncestorMetadata() with [new HostMetadata(), new SkipSelfMetadata()]
    Replace new UnboundedMetadata() with new SkipSelfMetadata()
    Replace new Ancestor({self:true}) with new HostMetadata()
2015-07-31 02:30:26 +00:00
vsavkin 71ea19902a perf(change_detection): removed the currentProto property 2015-07-31 00:31:11 +00:00
Pawel Kozlowski 2768158eaf tests(ProtoViewBuilder): host properties binding to unknown props
When binding a host property, we shouldn't try to bind to any
directive properties that might exist on a host element

Closes #3383
2015-07-30 16:16:35 -07:00
Jeff Cross 4e76cac5b7 fix(core): export LifeCycle at top-level modules
LifeCycle can now be imported via angular2/angular2 or
angular2/core, so that end users can inject it without
having to use the full source path.

Closes #3395
2015-07-30 21:52:29 +00:00
Tobias Bosch 0dbdd5cd3c refactor(render): don’t store DOM nodes but store strings for big ProtoViews.
Also inserts comment nodes before/after projected nodes so that text nodes don’t get merged when we serialize/deserialize them.

Closes #3356
First part of #3364
2015-07-30 14:11:13 -07:00
Yegor Jbanov 29095766e6 fix(bootstrap): fix expressions containing bootstrap (fixes #3309) 2015-07-30 12:06:53 -07:00
Jason Teplitz 7b834e02ec feat(WebWorkers) Add DOM event support
closes #3046
2015-07-29 23:34:43 +00:00
Rado Kirov 34acef58e7 fix(query): view query should not be updated when subviews are attached. 2015-07-29 22:33:15 +00:00
vsavkin c1ee943533 perf(change_detection): do not check intermediate results 2015-07-29 21:58:29 +00:00
Jeremy Elbourn f7d7789915 fix(decorators): stop directives inheriting parent class decorators.
Fixes #2291
2015-07-29 21:23:31 +00:00
Tim Blasi 9c19eb906b refactor(change_detect): Move (de)hydrate methods into superclass
Move the implementation of `(de)hydrate`, `hydrated`, and
`detectChangesInRecords` into `AbstractChangeDetector`.

Add comments clarifying the contract between `AbstractChangeDetector`
and its subclasses.

Closes #3245
2015-07-29 13:12:53 -07:00
yjbanov 73b7d99dc4 fix(style_url_resolver): fix data: url resolution 2015-07-29 11:24:17 -07:00
Tim Blasi 192cf9ddf5 refactor(change_detect): Move common fields to AbstractChangeDetector
Move fields common to Dynamic, Jit, and Pregen change detectors into the
`AbstractChangeDetector` superclass to save on codegen size and reduce
code duplication.

Update to #3248, closes #3243
2015-07-29 10:46:49 -07:00
Pawel Kozlowski d894aa9101 feat(compiler): introduce schema for elements
Closes #3353
2015-07-29 19:40:46 +02: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
Jacob MacDonald 2faa89852b fix(transformer): Fix generation of `annotations` argument when registering functions. 2015-07-28 15:26:33 -07:00
Tim Blasi d84993faf1 refactor(change_detect): Move (de)hydrate logic into dedicated methods
Call new `(de)hydrateDirectives` methods from `(de)hydrate`. Add a null
implementation in `AbstractChangeDetector` and only override if
necessary for the specific change detector.

Update to #3248
2015-07-28 15:10:06 -07:00
Tim Blasi a9efc48e71 refactor(change_detect): Create & use `looseNotIdentical`
Create `looseNotIdentical => !looseIdentical`, which will save a lot of
unnecessary '!' characters in generated change detectors.

Update to https://github.com/angular/angular/issues/3248
2015-07-28 14:59:31 -07:00
vsavkin 8543c347a8 feat(core): provide an error context when an exception happens in an error handler 2015-07-28 14:22:15 -07:00
Rado Kirov 1d4502944c fix(query): the view should not be visible to @Query.
@ViewQuery is the correct way to query the view template.
2015-07-28 14:16:14 -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
gdi2290 6fac901151 feat(http): call complete on request complete
closes #2635
2015-07-28 11:45:15 -07:00