946 Commits

Author SHA1 Message Date
Tim Blasi
25ddd8718d feat(forms): Export NumberValueAccessor
Export `NumberValueAccessor` from `forms/directives.ts`
2015-10-28 10:36:18 -07:00
Jesús Rodríguez Rodríguez
3ed9796425 docs(SlicePipe): fix ng-for example
Closes #4975
2015-10-28 15:54:47 +00:00
Tim Blasi
c91fc49d01 test(dart/transform): Update tests for new codegen
Update unit tests for `bind_generator` responsibility move.
2015-10-28 08:18:56 -07:00
vsavkin
f9963d3d21 refactor(di): minor cleanup 2015-10-28 07:32:40 -07:00
mgechev
6514b8ced0 fix(di): allow dependencies as flat array 2015-10-28 07:32:40 -07:00
Martin Probst
c02f2bdab0 chore: adjust formatting to new clang-format.
- fixes wrapping for object literal keys called `template`.
- spacing in destructuring expressions.
- changes to keep trailing return types of functions closer to their
  function declaration.
- better formatting of string literals.

Closes #4828
2015-10-28 11:19:10 +01:00
Yegor Jbanov
edfa35b11d fix(facades): reduce node count by 1 in assertionsEnabled 2015-10-27 23:14:52 -07:00
Eric Mendes Dantas
5fc28e65ef docs(provider): fix formatting
Closes #4957
2015-10-28 01:42:10 +00:00
Victor Berchet
1316c3e391 fix(ChangeDetector): support for NaN
Closes #4853
2015-10-28 00:44:06 +00:00
vsavkin
758062807a feat(forms): support adding validators to ControlGroup via template
Closes #4954
2015-10-28 00:13:20 +00:00
vsavkin
f98faf0702 refactor(forms): make Validators.group and Validators.array private 2015-10-28 00:13:20 +00:00
Victor Berchet
42ea31b993 docs(QueryMetadata): fix wrong selectors and improve syntax highlighting
closes #4544

Closes #4958
2015-10-27 23:39:58 +00:00
mgechev
fdbb505a8a docs(di): fix SelfMetadata example
closes #4580
2015-10-27 23:39:58 +00:00
Olivier Combe
7478105178 docs(PipeTransform): added pure parameter
closes #4667

The documentation was outdated since alpha 38 when the `pure` parameter
was added to the `PipeMetadata`.
2015-10-27 23:39:58 +00:00
Tobias Bosch
540b8c2a1a fix(renderer): support xlink:href attribute in svg
Closes #4956
2015-10-27 16:22:32 -07:00
gdi2290
dc6a066fed refactor(application): rename Binding into Provider
while creating the server version I noticed bindings are still
mentioned

Closes #4951
2015-10-27 22:39:22 +00:00
Tobias Bosch
ac52bfd80f fix(render): create svg elements with the right namespace
Temporary fix for #4506
Closes #4949
2015-10-27 14:45:00 -07:00
Tobias Bosch
27dbd2ded4 fix(compiler): load style urls in runtime mode correctly
Closes #4952
2015-10-27 14:31:21 -07:00
vsavkin
ed4826b08c feat(forms): Implement a way to manually set errors on a control
Example:

var login = new Control("someLogin");
c.setErrors({"notUnique": true});
expect(c.valid).toEqual(false);
expect(c.errors).toEqual({"notUnique": true});

c.updateValue("newLogin");
expect(c.valid).toEqual(true);

BREAKING CHANGE:

Before:

ControlGroup.errors and ControlArray.errors returned a reduced value of their children controls' errors.

After:

ControlGroup.errors and ControlArray.errors return the errors of the group and array.
And ControlGroup.controlsErrors and ControlArray.controlsErrors return the reduce value of their children controls' errors.

Closes #4917
2015-10-27 19:31:25 +00:00
Rado Kirov
bfe3efab3b chore(compiler): dead code clean-up.
Dead code that uglifyJS found.

Closes #4907
2015-10-27 12:00:44 +00:00
Victor Berchet
3416984cce refactor(RuntimeMetadataResolver): simplify the code
Closes #4874
2015-10-27 01:16:46 +00:00
Victor Berchet
abdd524911 refactor(RuntimeMetadata): Annotation -> Metadata 2015-10-27 01:16:46 +00:00
Victor Berchet
e1e52c098b refactor(Compiler): misc minor updates 2015-10-27 01:16:46 +00:00
Victor Berchet
dd2598ccd8 refactor: use ListWrapper.find() 2015-10-27 01:16:46 +00:00
Victor Berchet
b90d899408 doc(DynamicComponentLoader): update API doc 2015-10-27 01:16:46 +00:00
Tobias Bosch
d8b3601927 fix(style_url_resolver): include asset: urls into precompiled stylesheets.
Closes #4926
2015-10-26 17:19:33 -07:00
Tobias Bosch
60bedb43de fix(debug_element): don’t descend into merged embedded views on componentChildren.
Closes #4920
2015-10-26 16:39:49 -07:00
vsavkin
c5f490ba43 chore(forms): deprecate the old Query API
The old API has been replaced with ContentChildren and ViewChildren.

Closes #4922
2015-10-26 22:47:37 +00:00
Alex Rickabaugh
8dd3082ea3 feat(core): PlatformRef and ApplicationRef support registration of disposal functions.
These functions will be called whenever the platform or application are being disposed.
2015-10-26 21:35:18 +00:00
Tobias Bosch
b2dc5c2c7e fix(compiler): create literal property bindings for empty *… directives.
Closes #4916
2015-10-26 13:55:34 -07:00
Tobias Bosch
2957b0b32e fix(ng_class): support sets correctly
Previously, NgClass threw in Dart checked mode.

Closes #4910
2015-10-26 13:37:33 -07:00
Ted Sander
28d88c5b12 feat(validators): Allow errors at both the group/array level or their children
Allow ControlGroups and ControlArrays to contain errors from their level, and
errors from their children. [Design Doc](https://docs.google.com/document/d/1EnJ3-_iFpVKFz1ifN1LkXSGQ7h3A72OQGry2g8eo7IA/edit?pli=1#heading=h.j53rt81eegm4)

BREAKING CHANGE: errors format has changed from validators. Now errors from
a control or an array's children are prefixed with 'controls' while errors
from the object itself are left at the root level.
Example:
Given a Control group as follows:
var group = new ControlGroup({
  login: new Control("", required),
  password: new Control("", required),
  passwordConfirm: new Control("", required)
});

Before:
group.errors

{
  login: {required: true},
  password: {required: true},
  passwordConfirm: {required: true},
}

After:
group.errors

{
  controls: {
    login: {required: true},
    password: {required: true},
    passwordConfirm: {required: true},
  }
}
2015-10-26 11:48:32 -07:00
Ted Sander
c9fba3fa1f feat(validators): Add a pending state to AbstractControl
Add a pending state to AbstractControl and a function to set that state on
themselves and their parents. This will be used for both individual async
validators and when the imperitive mode is used. [Design Doc](https://docs.google.com/document/d/1EnJ3-_iFpVKFz1ifN1LkXSGQ7h3A72OQGry2g8eo7IA/edit?pli=1#heading=h.j53rt81eegm4)
2015-10-26 11:48:32 -07:00
Victor Berchet
04b4035ecd refactor(AppViewListener): prefix listener with on for consistency
Closes #3925
2015-10-26 18:28:27 +00:00
vsavkin
608cdc4077 cleanup(forms): clean up NgFormControl
Closes #4912
2015-10-26 18:15:58 +00:00
mikael
d29a9a99aa fix(forms): handle control change in NgFormControl
when a new Control instance is bound to the directive, use the new instance, not the old one
2015-10-26 18:15:58 +00:00
Tobias Bosch
3118d5cebb fix(compiler): support events on a template element that are consumed via a direct expression
Closes #4883
2015-10-26 10:45:01 -07:00
Tobias Bosch
56a9b020d4 fix(default_value_accessor): support custom input elements that fire custom change events.
Closes #4878
2015-10-26 14:33:47 +00:00
Victor Berchet
4639f449cf feat(Parser): associate pipes right to left
closes #4605

BREAKING CHANGE:

Before:

`1 + 1 | pipe:a | pipe:b` was parsed as `(1 + 1) | pipe:(a | pipe:b)`

After:

`1 + 1 | pipe:a | pipe:b` is parsed as `((1 + 1) | pipe:a) | pipe:b`

Closes #4716
2015-10-21 18:43:10 +00:00
Yegor Jbanov
491e1fdd2c feat: move NgZone to Stream/Observable-based callback API
BREAKING CHANGES:
- deprecates these methods in NgZone: overrideOnTurnStart, overrideOnTurnDone, overrideOnEventDone, overrideOnErrorHandler
- introduces new API in NgZone that may shadow other API used by existing applications.
2015-10-20 21:51:19 -07:00
Yegor Jbanov
a7c95ade2e chore: use interface types in ng_zone/JS 2015-10-20 21:49:36 -07:00
Yegor Jbanov
711dbf4975 fix(compiler): do not match directives to variable names
BREAKING CHANGES:
- you can no longer use a #foo or a var-foo to apply directive [foo], although
  it didn't work properly anyway.

This commit is fixing breakage caused by the switch to pre-compiler (exact SHA
unknown).
2015-10-20 20:31:55 -07:00
Victor Berchet
91f71d2c3f refactor(ChangeDetection): fix a typo
Closes #4675
2015-10-20 18:19:43 +00:00
Victor Berchet
0a940211d5 feat(change detection): remove support for "if"
BREAKING CHANGE: Remove if statement support from actions.

Closes #4616
2015-10-20 18:15:08 +00:00
Tim Blasi
fd0ba37734 refactor(dart): Format Dart code
Use the dart formatter to clean up all pure Dart code.

Closes #4832
2015-10-20 17:39:37 +00:00
Naomi Black
be3e7db5db docs(chore): make styles consistent for API doc headings
Closes #4816
2015-10-19 14:58:22 +00:00
Tobias Bosch
fd9b67537d fix(url_resolver): always replace package: in Dart, even if it came from baseUrl.
Closes #4775
2015-10-15 16:57:54 -07:00
Julie Ralph
d7ab5d44a5 fix(testing): let DOM adapter dictate XHR implementation for tests
The test injector now uses an XHR implementation based on DOM.getXHR,
which allows the current DOM adapter to dictate which XHR impl should
be used.

To prevent the changes to DOM adapter from introducing undesired new
dependencies into the benchmarks, separate the async facade into
a promise facade which is reexported by facade/async.

See #4539
2015-10-15 12:12:27 -07:00
vsavkin
65c737fc95 feat(forms): add input[type=number] value accessor
Closes #4014

Closes #4761
2015-10-15 18:41:17 +00:00
Tobias Bosch
a941fb08f7 fix(style_compiler): don’t resolve absolute urls that start with a / during compilation
Closes #4763
2015-10-15 11:13:52 -07:00