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
Brian Ford
280cd33f2e
fix(router): fix error message text
2015-10-27 10:09:15 +00:00
Brian Ford
07cdc2ff44
feat(router): add support for route links with no leading slash
...
Closes #4623
2015-10-27 09:01:16 +00:00
Brian Ford
7af27f9617
chore(test): bump jasmine timeout to 500ms
2015-10-27 09:01:15 +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
2e059dc916
feat(router): Make RootRouter disposable to allow cleanup of Location subscription. ROUTER_PROVIDERS now automatically disposes of the RootRouter when the application is disposed.
...
Closes #4915
2015-10-26 21:35:18 +00:00
Alex Rickabaugh
2674eaca51
feat(router): Support unsubscription from Location by returning the subscription.
2015-10-26 21:35:18 +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
vsavkin
28db864690
cleanup(forms): add missing tests
2015-10-26 11:50:30 -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
Jeremy Attali
485c85bfe7
fix(core): Fix typo
...
arithemtic should be arithmetic.
Closes #4803
2015-10-26 17:52:42 +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
Constantin Gavrilete
de6774cd97
docs(typo): fix invalid TypeScript synatx in example
...
Closes #4870
2015-10-23 21:03:58 +00:00
Jason Teplitz
84d1f93d83
fix(WebWorker): Serialize scroll events
...
closes #4836
Closes #4840
2015-10-23 20:26:29 +00:00
Alberto Santini
785abe5a1d
chore(http): remove double "var http" in http spec
...
Closes #4859
2015-10-22 10:08:35 +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
77604b8b18
chore: add test showing CSS calc() failure
2015-10-21 11:02:55 -07: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
Misko Hevery
9d0d33f95a
feat(ngUpgrade): simple example
2015-10-19 12:43:28 -07:00
Tim Blasi
cf9d4662c9
refactor(dart/transform): Update protobuf dependencies
...
Update
- libprotoc to 2.6.1
- dart-protoc-plugin to 0.5.0
- pkg/protobuf 0.5.0
Closes #4681
2015-10-19 10:32:17 -07:00
Naomi Black
be3e7db5db
docs(chore): make styles consistent for API doc headings
...
Closes #4816
2015-10-19 14:58:22 +00:00
kutyel
e4e74ae65c
chore: rename modules/examples to modules/playground
...
The directory contains code authored in a style that makes it transpilable to dart. As such, these are not idiomatic examples of Angular 2 usage.
The main purpose of this directory is to enable experimentation with Angular within the angular/angular repository.
Closes #4342
Closes #4639
2015-10-18 11:48:43 +00:00
Brandon Roberts
c3ab20cc87
docs(router): Updated documentation for router outlet deactivate method
...
Closes #4752
2015-10-16 02:26:12 +00:00
Alex Eagle
05d29a936d
fix(typings): don't expose RootTestComponent_
...
fixes #4776
Closes #4777
2015-10-16 01:37:14 +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
Alex Eagle
c066d696e8
chore(package.json): remove typings bundles
...
This was used for , but now that our typings are laid out in the node_module, users should no longer need that.
Also fix the project name in root package.json. There is a risk that someone runs npm publish in this directory, which will create a new version of angular 1, and contain a scary source tree.
So this package.json may as well have a name that doesn't exist on npm, and if we did publish by accident, it would be a package name that matches the contents.
2015-10-15 16:17:17 -07:00
Misko Hevery
d896e4350a
feat(ngUpgrade): add support for upgrade/downgrade of injectables
...
Closes #4766
2015-10-15 20:28:28 +00:00
Misko Hevery
486c1eda8e
docs(ngUpgrade): document public methods
2015-10-15 20:28:28 +00:00
Misko Hevery
053b7a50e1
feat(ngUpgrade): faster ng2->ng1 adapter by only compiling ng1 once
...
The adapter only compiles ng1 template. This means that we need to
reimplement / emulate all of the ng1’s API on the HOST element.
interface IDirective {
compile?: IDirectiveCompileFn; // NOT SUPPORTED
controller?: any; // IMPLEMENTED
controllerAs?: string; // IMPLEMENTED
bindToController?: boolean|Object; // IMPLEMENTED
link?: IDirectiveLinkFn | IDirectivePrePost; // IMPLEMENTED (pre-link only)
name?: string; // N/A
priority?: number; // NOT SUPPORTED
replace?: boolean; // NOT SUPPORTED
require?: any; // IMPLEMENTED
restrict?: string; // WORKING
scope?: any; // IMPLEMENTED
template?: any; // IMPLEMENTED
templateUrl?: any; // IMPLEMENTED
terminal?: boolean; // NOT SUPPORTED
transclude?: any; // IMPLEMENTED
}
2015-10-15 20:28:28 +00:00
Misko Hevery
059e8faae2
refactor(ngUpgrade): renames and docs
...
BREAKING CHANGE:
- Changes the terminology to Adapter and upgrade/downgrade
- Removes the Module from the public API to prevent confusion
2015-10-15 20:28:28 +00: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
Marc Laval
427860a5bd
chore(saucelabs): add Edge
...
Closes #4758
2015-10-15 18:20:41 +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
Tobias Bosch
cec8b58373
fix(compiler): explicitly support event bindings also on `<template>` elements
...
Although these events don’t fire events themselves, there might be directives on them that fire events.
Closes #4712
2015-10-15 10:08:22 -07:00
Marc Laval
b89c5bc581
fix(compiler): attribute case in IE9
...
Closes #4743
2015-10-15 10:18:15 +02:00
Tobias Bosch
7dde18b181
fix(style_compiler): don’t touch urls in stylesheets and keep stylesheets with absolute urls in templates
...
We can’t resolve relative urls (e.g. for images) in the compiler as
these urls are meant to be loaded in the browser
(unless we would inline images as base64…).
Also, keep `<link rel=“stylesheet”>` in templates that
reference absolute urls with e.g. `http://`. This
behavior was already present for `@import` rules
within stylesheets.
Closes #4740
2015-10-15 01:42:48 +00:00
Kevin Moore
a91ae291e4
fix(test) fix Dart annotation for integration_dart_spec.dart
2015-10-15 00:19:31 +00:00
vsavkin
b716d2335b
fix(forms): emit value changes after errors and status are set
...
Closes #4714
2015-10-14 19:36:43 +00:00
vsavkin
bfbf18d983
feat(query): add filter and reduce to QueryList
...
Closes #4710
2015-10-13 23:52:17 +00:00
vsavkin
e82a35d1fd
feat(forms): add minlength and maxlength validators
...
Closes #4705
2015-10-13 21:42:12 +00:00
Marc Laval
e15e2428c5
fix(test): command compiler attr merge test in IE
2015-10-13 13:39:32 -07:00
Alex Rickabaugh
3a801c16fa
fix(docs): minor @link fixes.
...
Closes #4696
2015-10-13 20:24:55 +00:00
Matias Niemelä
1bc35208df
test(router): add testing code for querystring serialization
2015-10-13 12:06:22 -07:00
Matias Niemelä
ea661fa10f
chore(examples): extend inbox example code to include sorting
2015-10-13 12:06:22 -07:00
Brian Ford
c0b7bae9d3
test(router): add missing tests for the url parser
2015-10-13 12:06:22 -07: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
Brian Ford
440fd11c72
feat(facade): add fromISODate method
2015-10-13 12:06:22 -07:00
Julie Ralph
f529236bfc
refactor(test): rename test_lib to testing
...
Old test_lib is now testing_internal
test_lib_public is now testing
2015-10-13 10:36:49 -07:00
Julie Ralph
a1fa2e472f
feat(test): Add an external version of the test library
...
Adds test adapters for TypeScript and JavaScript only, exported
as part of the test_lib module. These work with the Jasmine test
framework, and allow use of the test injector within test blocks
via the `inject` function.
See #4572 , #4177 , #4035 , #2783
This includes the TestComponentBuilder. It allows using the
test injector with Jasmine bindings, and waits for returned
promises before completing async test blocks.
2015-10-12 23:14:03 -07:00
Alex Eagle
947bf11cb6
chore(docs): copy [Decorator]Metadata docs to the [Decorator]
...
This allows editors to show the docs when users navigate to definition.
See #4668
Closes #4683
2015-10-13 00:30:24 +00:00
vsavkin
1aeafd31bd
feat(di): change the params of Provider and provide to start with "use"
...
Closes #4684
2015-10-12 21:09:09 +00:00
Pawel Kozlowski
f443ecbfa6
refactor(router): use compiler's public API in imports
...
Closes #4662
2015-10-12 20:14:22 +00:00
Pawel Kozlowski
8667b760f4
refactor(router): use DI imports from public API
...
This allows us to create smaller CJS bundles for router,
where the bundle doesn't duplicate code from angular2 core.
2015-10-12 20:14:22 +00:00
Igor Minar
6abed8d996
fix(test_lib): don't mock out XHR via MockXHR by default in tests
...
This is useful for the compiler tests, but otherwise it's not useful.
Additionally if an application has external templates (as is common) then
we should actually fetch these templates in tests.
Fixes #4539
Closes #4682
2015-10-12 17:45:19 +00:00
Tobias Bosch
eacc8e3803
fix(compiler): merge `class` and `style` attributes from the element with the host attributes
...
Closes #4583
Closes #4680
2015-10-12 15:35:49 +00:00
Marc Laval
0def28e594
fix(compiler): shadow CSS @import test in some browsers
...
Closes #4629
2015-10-12 00:28:07 +02:00
Alex Eagle
b96784756c
chore(docs): remove @View decorator from examples in docs
...
Closes #4666
2015-10-11 22:02:38 +00:00
vsavkin
62005dd127
docs(core): fix links in core docs
2015-10-11 14:42:36 -07:00
vsavkin
52ebb8f0dd
docs(di): fix links di docs
2015-10-11 14:42:15 -07:00
Victor Berchet
35878c559f
doc(LifecycleHooks): change Property for Input
...
Closes #4652
2015-10-11 16:44:28 +00:00
Pawel Kozlowski
0c1f9dab54
refactor(http): use shared code from public 'angular2/angular2' namespace
...
Closes #4648
2015-10-11 11:38:19 +00:00
vsavkin
1eb0162cde
feat(di): rename Binding into Provider
...
Closes #4416
Closes #4654
2015-10-11 05:13:31 +00:00
vsavkin
7c6130c2c5
feat(core): desugar [()] to [prop] and (prop-change)
...
BREAKING CHANGE
Before
```
<cmp [(prop)]="field"> was desugared to <cmp [prop]="field" (prop)="field=$event">
```
After
```
<cmp [(prop)]="field"> is desugared to <cmp [prop]="field" (prop-change)="field=$event">
```
Closes #4658
2015-10-11 02:58:13 +00:00
Pawel Kozlowski
df09389df8
docs(NgClass): update docs, add example
...
Closes #4520
2015-10-10 11:42:25 +00:00
Alex Rickabaugh
90191ce261
refactor(router): use ApplicationRef to provide the first bootstrapped component as ROUTER_PRIMARY_COMPONENT automatically.
...
This removes the routerBindings function as it is no longer necessary. ROUTER_BINDINGS will automatically pick the first bootstrapped component to satisfy ROUTER_PRIMARY_COMPONENT.
BREAKING CHANGE:
Before: bootstrap(MyComponent, [routerBindings(myComponent)]);
After: bootstrap(MyComponent, [ROUTER_BINDINGS]);
Closes #4643
2015-10-10 05:19:55 +00:00
Misko Hevery
19c1bd7375
feat(ngUpgrade): transclude content from ng2->ng1
...
Closes #4640
2015-10-09 21:41:56 -07:00
Misko Hevery
84c3124292
chore(ngUpgrade): cleanup TS errors
2015-10-09 21:25:48 -07:00
Misko Hevery
cd90e6ed8f
feat(ngUpgrade): support for content project from ng1->ng2
2015-10-09 21:25:45 -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
Alex Eagle
95f984615b
Produce .d.ts files from our typescript compilation.
...
Deliver them into our npm module output so users can consume them directly.
Fixes #3082
2015-10-10 02:18:33 +00:00
Victor Berchet
393b0526b4
refactor(NgZone): improve types
...
Closes #4642
2015-10-09 23:54:31 +00:00
Tobias Bosch
6207b1af88
feat(ngFor): support a custom template
...
Part of #1989
Closes #4637
2015-10-09 21:52:59 +00:00
Victor Berchet
a8c34ae290
refactor(MapWrapper): drop delete(), get(), forEach() and size
...
Closes #4618
2015-10-09 20:07:43 +00:00
Alex Eagle
aab0c57aee
fix(typings): add more missing typings.
...
This is the same bug pattern I reported in https://github.com/Microsoft/TypeScript/issues/5187
Closes #4636
2015-10-09 19:00:42 +00:00
Alex Eagle
c178ad476e
fix(typings): fix typings which were previously unchecked
...
Closes #4625
2015-10-09 16:23:30 +00:00
Alex Eagle
597f79e0c7
fix(typings): missing types in ListWrapper typings
2015-10-09 16:23:30 +00:00
Shahar Talmi
31f48ae943
refactor(ngOutlet): using some typescript features
...
Closes #4386
2015-10-09 03:40:42 +00:00
Shahar Talmi
1272affe5c
refactor(ngOutlet): move to typescript
2015-10-09 03:40:42 +00:00
Shahar Talmi
431ac33c26
refactor($router): removed some redundant code
2015-10-09 03:40:42 +00:00
Pascal Precht
cd2050b6e0
docs(router): route alias has to be written in PascalCase
...
Closes #4547
2015-10-09 03:25:51 +00:00