Commit Graph

1878 Commits

Author SHA1 Message Date
Pawel Kozlowski 2d0c8f1b0e fix(NgFor): allow default templates with ng-for-template
Closes #5161
2015-11-06 19:26:02 +00:00
Pawel Kozlowski c6ad269f43 chore(build): remove es5build.js
Fixes #5030

Closes #5144
2015-11-06 18:22:57 +00:00
Victor Berchet a0a627f2f9 refactor(StringWrapper): remove useless methods
Closes #5039
2015-11-06 17:04:01 +00:00
Pawel Kozlowski 253e2b2285 refactor(router): don't import public APIs from internal paths
Closes #5139
2015-11-06 07:57:35 +00:00
Alex Rickabaugh aa70275b01 chore(tests): Enable dev mode in all Angular tests.
Closes #5106
2015-11-06 07:07:04 +00:00
Alex Rickabaugh 4bb9c46cf1 fix(core): Provide setDevMode() to enable/disable development mode in Javascript. 2015-11-06 07:07:04 +00:00
vsavkin 7343ef04ae feat(forms): remove controlsErrors
BREAKING CHANGE

Previously, the controlsErrors getter of ControlGroup and ControlArray returned the errors of their direct children. This was confusing because the result did not include the errors of nested children (ControlGroup -> ControlGroup -> Control). Making controlsErrors to include such errors would require inventing some custom serialization format, which applications would have to understand.

Since controlsErrors was just a convenience method, and it was causing confusing, we are removing it. If you want to get the errors of the whole form serialized into a single object, you can manually traverse the form and accumulate the errors. This way you have more control over how the errors are serialized.

Closes #5102
2015-11-06 01:47:37 +00:00
vsavkin 4439106a1f feat(facade): add support for async validators returning observables
Closes #5032
2015-11-06 01:20:03 +00:00
vsavkin 2c201d3f34 feat(facade): add a way to convert observables into promises 2015-11-06 01:20:03 +00:00
vsavkin fc50829481 feat(facade): add a way to detect if an object is a Promise 2015-11-06 01:20:03 +00:00
vsavkin 695923dcd6 refactor(core): move directives, pipes, and forms into common
BREAKING CHANGE

All private exports from 'angular2/src/core/{directives,pipes,forms}' should be replaced with 'angular2/src/common/{directives,pipes,formis}'

Closes #5153
2015-11-05 23:00:32 +00:00
vsavkin 6edd964a83 chore(core): move compiler out of core
BREAKING CHANGE

All imports from 'angular2/core/compiler' should be changed to 'angular2/compiler'.
2015-11-05 14:44:52 -08:00
Alex Rickabaugh f21e78244f feat(forms): Use the DefaultValueAccessor for controls with an ng-default-control attribute.
Third party controls require a ControlValueAccessor to function with Angular Forms. Many of them, like Polymer's <paper-input>, behave like the <input> native element and thus can use the DefaultValueAccessor. Adding an ng-default-control attribute will now allow them to use that directive.

Closes #5076
2015-11-05 19:53:46 +00:00
Alex Rickabaugh fee5dea826 fix(forms): Export the NG_VALUE_ACCESSOR binding token.
This is needed to allow component authors to implement custom ControlValueAccessors for their input components.
2015-11-05 19:53:46 +00:00
Victor Berchet b84855f394 refactor: private methods should not be decorated with internal
Closes #5146
2015-11-05 19:28:30 +00:00
Victor Berchet 7e92d2e6b7 feat(ChangeDetector): Add support for short-circuiting 2015-11-05 19:28:30 +00:00
Victor Berchet b91351469f refactor(ChangeDetector): misc minor updates 2015-11-05 19:28:30 +00:00
Victor Berchet c56efc0c5f refactor(ChangeDetector): use View/ShadowDom & Content/LightDom consistently 2015-11-05 19:28:30 +00:00
mgechev f54ba3cc1b docs(query_list): update highlight language
Closes #5029
2015-11-05 08:55:25 +00:00
Pawel Kozlowski f1989e7e1c fix(compiler): remove style when [style.foo]='exp' evaluates to null
Fixes #5110

Closes #5114
2015-11-05 06:50:46 +00:00
Jeff Cross a69e7fe297 fix(RouterLink): do not prevent default behavior if target set on anchor element
If the anchor element on which the "router-link" directive is present has a target
attribute other than "_self," the handler will not prevent default behavior of
the browser.

Closes #4233
Closes #5082
2015-11-04 19:55:46 +00:00
Rob Wormald a9b1270a5a fix(http): use Observable<Response> on Http methods
use correct type definitions for Http responses.

Closes #5017
2015-11-04 19:19:50 +00:00
Rob Wormald 31687efd64 fix(http): use Response for JSONP errors
Return Response when JSONP backend errors
2015-11-04 19:19:50 +00:00
Peter Bacon Darwin 69e4b62809 docs(onDestroy): fix broken backticks
Closes #5089
2015-11-04 17:51:32 +00:00
Julie Ralph d0c65c144a for fixup - keep RootTestComponent around, but deprecate 2015-11-03 14:56:23 -08:00
Julie Ralph 686457890d chore(test): rename RootTestComponent to ComponentFixture
BREAKING CHANGE:

Before:

```
testComponentBuilder.createAsync(MyComponent).then(root: RootTestComponent => {
}
```

After:

```
testComponentBuilder.createAsync(MyComponent).then(fixture: ComponentFixture => {
}
```

Closes #4711
2015-11-03 14:56:22 -08:00
mlaval a16214c614 chore(test): failures in browsers which do no support Symbol.iterator
Closes #5069
2015-11-03 21:27:16 +00:00
vsavkin 5948abab7a feat(core): add support for ambient directives
Ambient directives can be configured when bootstraping an application.
Ambient directives can be used in every component of the application without
needing to explicitly list them.
2015-11-03 07:54:29 -08:00
Yegor Jbanov c814dfbfa5 fix: remove internal usages of deprecated overrideOnTurnDone
Closes #5079
2015-11-02 23:46:20 +00:00
Yegor Jbanov 8dc079eee5 docs: add @Input/@Output to deprecation messages 2015-11-02 14:48:23 -08:00
Yegor Jbanov c4129071ef docs(metadata): provide deprecation messages 2015-11-02 14:48:22 -08:00
vsavkin 1c322f13e5 feat(forms): update FormBuilder to support async validations
Closes #5020
2015-11-02 18:03:03 +00:00
vsavkin 31c12af81f feat(forms): add support for adding async validators via template
Example:

@Directive({
  selector: '[uniq-login-validator]',
  providers: [provide(NG_ASYNC_VALIDATORS, {useExisting: UniqLoginValidator, multi: true})]
})
class UniqLoginValidator implements Validator {
  validate(c) { return someFunctionReturningPromiseOrObservable(); }
}
2015-11-02 18:03:03 +00:00
vsavkin cf449ddaa9 feat(forms): implements a combinator for composing async validators 2015-11-02 18:03:02 +00:00
vsavkin 53bd6e1642 feat(facade): add ObservableWrapper.fromPromise 2015-11-02 18:03:02 +00:00
Misko Hevery 1b78342e23 chore(ngUpgrade): Move into Angular2
This is moving ngUpgrade into the main repository per #4838.
The ngUpgrade is published from the main import consistent with
https://docs.google.com/document/d/1rbVTKTYLz6p2smQNYI8h4-QN-m2PS6F3iQIDmSzn0Ww/edit#heading=h.6cxvr9awtf5r
Closes #4931
2015-10-31 20:48:27 -07:00
Brian Ford 0ebe283b37 feat(router): provide RouteConfig object for AuxRoute
Closes #4319
2015-10-30 17:26:12 -07:00
Brian Ford 23784a2eca fix(router): properly serialize aux routes
Previously, routes would be generated with a leading slash after the parens:

    example.com/foo(/bar)

This fix removes the trailing slash when generating the URL, so now we have:

    example.com/foo(bar)

This change is not breaking because we still recognize both forms. We just normalize
without the slash.
2015-10-30 17:26:12 -07:00
Tobias Bosch d8775e0e1f fix(shadow_css): strip comments and fix logic for parsing rules.
Closes #5037
Closes #5011
2015-10-30 16:28:26 -07:00
Brian Ford 53bddec1d2 fix(router): respond to hashchange events
Previously if the URL changed in `HashLocation` mode, the router would not pick up the change.
This adds a listener in `HashLocationStrategy` for `hashchange` events to fix the problem.

Closes #5013
2015-10-30 15:04:31 -07:00
Brian Ford cb2b690471 chore(examples): explain the purpose of these examples 2015-10-30 14:27:47 -07:00
Tim Blasi 45b33c5a90 perf(dart/transform): Restrict visibility/mutability of codegen
For exported, generated templates, declare with `final` so `dart2js`
knows they will never be reassigned.

For non-exported, generated change detector classes, prefix the
classname with `_` to mark them as internal.

Closes #5009
2015-10-30 17:49:06 +00:00
mgechev ebd15a7855 chore(http): assert that url is present when creating new Request
Closes #4650
2015-10-30 04:52:40 +00:00
Stacy Gay fa44da16c8 refactor(linker): Expose ViewResolver to public api
Fixes https://github.com/angular/angular/issues/4780

Closes #4789
2015-10-29 21:21:04 -07:00
vsavkin 56e736439b fix(analyzer): fix dart analyzer errors
Closes #4992
2015-10-30 01:10:36 +00:00
vsavkin 9d58f46ea5 fix(forms): update compose to handle null validators 2015-10-30 01:10:36 +00:00
vsavkin bb2b961f93 feat(forms): add support for async validations 2015-10-30 01:10:36 +00:00
Tobias Bosch 39626a944d fix(ng-content): wildcard ng-content has to go last.
This was the case before the new compiler landed and should be preserved. 

Related to #4598
Closes #5016
2015-10-29 16:51:16 -07:00
Alex Rickabaugh d1b54d6807 fix(core): Add an error state for ChangeDetectors that is set when bindings or lifecycle events throw exceptions and prevents further detection.
- Changes the `alreadyChecked` flag of AbstractChangeDetector to a new `state` flag.
- Changes all checks of alreadyChecked to check that the state is NeverChecked.
- Set state to Errored if an error is thrown during detection.
- Skip change detection for a detector and its children when the state is Errored.
- Add a test to validate this fixes issue #4323.

Closes #4953
2015-10-29 23:11:02 +00:00
Rob Wormald 389ed2d941 refactor(async): fix ObservableWrapper.isObservable
Makes ObservableWrapper and AsyncPipe work with Observable, Subject, and EventEmitter
2015-10-29 23:06:16 +00:00