Commit Graph

5010 Commits

Author SHA1 Message Date
vsavkin d20488752b fix(router): top-levels do not work in ngIf 2016-06-27 13:34:54 -07:00
vsavkin 855f3afb28 fix(router): canceled navigations should return a promise that is resolved with false 2016-06-27 13:34:54 -07:00
vsavkin 3f44377f2f fix(router): handle empty path with query params 2016-06-27 13:34:54 -07:00
vsavkin 90295e3252 fix(router): preserve fragment on initial load 2016-06-27 13:34:54 -07:00
Jason Choi a620f95891 build(npm): upgrade ts-api-guardian to v0.1.4
Closes #9642
2016-06-27 12:27:59 -07:00
Martin Probst db66509e66 test(security): tests for HTML5 elements, srcset.
Part of #9572.
2016-06-27 12:19:03 -07:00
Cyrille Tuzi 6605eb30e9 feat(security): allow more HTML5 elements and attributes in sanitizers
Allow more elements and attributes from the HTML5 spec which were stripped by the htmlSanitizer.

fixes #9438

feat(security): allow audio data URLs in urlSanitizer

test(security) : add test for valid audio data URL

feat(security): allow and sanitize srcset attributes

test(security): test for srcset sanitization
2016-06-27 12:19:03 -07:00
Gion Kunz 3644eef860 feat(DomRenderer): Adding support for document fragments in SVG foreign objects (#9458) 2016-06-27 08:26:45 -07:00
Kai Ruhnau fb2509675d doc(changelog): add backticks around html elements so they actually render (#9637) 2016-06-27 08:21:34 -07:00
choeller eef9512ce6 fix(forms): async validator-directives process Observables correctly (#8186)
Closes #/8022
2016-06-26 16:52:50 -06:00
Marek Buko 9f00a1b902 fix(forms): add select multiple accessor as built-in accessor 2016-06-26 16:24:27 -06:00
Jesús Rodríguez c369bc747d docs: update cheatsheet import lines (#9614) 2016-06-26 07:31:35 -07:00
Kara Erickson c03e1f2f59 feat(forms): add support for formArrayName
Closes #9251
2016-06-25 13:30:53 -07:00
Kara Erickson 17dcbf66b9 feat(forms): expose ValidatorFn and AsyncValidatorFn
Closes #8834
2016-06-24 18:24:11 -07:00
Julie Ralph 40b907a657 refactor(testing): remove wrapping of Jasmine functions (#9564)
Instead, the async function now determines whether it should return a promise
or instead call a done function parameter. Importing Jasmine functions
from `@angular/core/testing` is no longer necessary and is now deprecated.

Additionally, beforeEachProviders is also deprecated, as it is specific
to the testing framework. Instead, use the new addProviders method directly.

Before:
```js
import {beforeEachProviders, it, describe, inject} from 'angular2/testing/core';

describe('my code', () => {
  beforeEachProviders(() => [MyService]);

  it('does stuff', inject([MyService], (service) => {
    // actual test
  });
});
```

After:
```js
import {addProviders, inject} from 'angular2/testing/core';

describe('my code', () => {
  beforeEach(() => {
    addProviders([MyService]);
  });

  it('does stuff', inject([MyService], (service) => {
    // actual test
  });
});
```
2016-06-24 17:48:35 -07:00
Julie Ralph a33195dcf3 fix(core/testing compiler/testing): move TestComponentBuilder to core/testing (#9590)
TestComponentBuilder now lives in core/testing. compiler/testing contains a private
OverridingTestComponentBuilder implementation which handles the private behavior
we need to override templates. This is part of the effort to simplify the testing
imports and hide compiler APIs.

Closes #9585

BREAKING CHANGE:

`TestComponentBuilder` is now imported from `@angular/core/testing`. Imports
from `@angular/compiler/testing` are deprecated.

Before:

```
import {TestComponentBuilder, TestComponentRenderer, ComponentFixtureAutoDetect} from '@angular/compiler/testing';
```

After:
```
import {TestComponentBuilder, TestComponentRenderer, ComponentFixtureAutoDetect} from '@angular/core/testing';
```
2016-06-24 17:35:01 -07:00
Victor Berchet c693c03f1d test(node): enable source maps in test.sh node (#9589) 2016-06-24 16:52:41 -07:00
Kara Erickson de127109f9 feat(forms): make valueChanges and statusChanges available on abstract control directives 2016-06-24 14:37:19 -07:00
vsavkin 83208983b3 chore(router): bump up version number 2016-06-24 13:07:42 -07:00
vsavkin 327d04c9c6 chore(router): clang-format 2016-06-24 12:44:32 -07:00
vsavkin 54edce2bab fix(router): wildcard don't get notified on url changes 2016-06-24 12:44:32 -07:00
vsavkin 1a145ac500 fix(router): default exact to false in routerLinkActiveOptions 2016-06-24 12:44:32 -07:00
vsavkin 9f978cf49d test(router): add a test checking that you can use a slash in query params 2016-06-24 12:44:32 -07:00
vsavkin 41b781107b fix(router): doen't throw on canDeactive when route hasn't advanced 2016-06-24 12:44:32 -07:00
Julie Ralph dcf75126bf fix(common/testing): remove internal MockLocationStrategy from common/testing (#9562)
BREAKING CHANGE:

MockLocationStrategy was intended to be internal only and is now removed
from the `@angular/common/testing` public api.

Use `SpyLocation` from `@angular/common/testing` for location testing.
2016-06-24 12:41:57 -07:00
Julie Ralph 1143b0389a fix(core/testing): move ComponentFixture to core (#9386)
BREAKING CHANGE:

`ComponentFixture` will be moving out of `@angular/compiler/testing` to `@angular/core/testing` in
this release. For now, it is deprecated from `@angular/compiler/testing`.
2016-06-24 12:41:49 -07:00
Kara Erickson 97a2119596 fix(forms): ngModel should emit valueChanges and statusChanges asynchronously 2016-06-24 12:37:46 -07:00
vsavkin fbd2dd9ca2 fix(router): handle path:'' redirects and matches 2016-06-24 11:39:41 -07:00
Alex Eagle f463e09b9f fix(ngc): work with typescript@next
This is required due to breaking change in TS, see
https://github.com/Microsoft/TypeScript/pull/8841#issuecomment-227300348
2016-06-24 10:27:31 -07:00
Jason Choi 42a5b6cbda chore(testing): upgrade ts-api-guardian to 0.1.3 2016-06-23 18:19:32 -07:00
Jeff Cross 0ad1215a92 build(changelog): remove old changelog script and add gulp task 2016-06-23 17:35:57 -07:00
Jeff Cross 7733c97df3 build(npm): update conventional-changelog dependency
Fixes #5672
2016-06-23 17:35:57 -07:00
Julie Ralph 8a9e9c7bd3 fix(core/testing): clean up the core testing public API (#9466)
Previously, we were exporting internal mocks and helpers. Move these
to core/testing/testing_internal or remove them if they were
never used.

Remove deprecated items - injectAsync, clearPendingTimers.

BREAKING CHANGE:

Remove the following APIs from `@angular/core/testing`, which have been deprecated or were
never intended to be publicly exported:

```
injectAsync
clearPendingTimers
Log
MockAppliacationHref
MockNgZone
clearPendingTimers
getTypeOf
instantiateType
```

Instead of `injectAsync`, use `async(inject())`.

`clearPendingTimers` is no longer required.
2016-06-23 17:10:22 -07:00
Julie Ralph 3d8eb8cbca fix(platform-browser/testing): clean up public api for platform-browser/testing (#9519)
Mostly, removing things that were never intended to be exported publicy.

BREAKING CHANGE:

The following are no longer publicly exported APIs. They were intended as internal
utilities and you should use your own util:

```
browserDetection,
dispatchEvent,
el,
normalizeCSS,
stringifyElement,
expect (and custom matchers for Jasmine)
```
2016-06-23 16:42:25 -07:00
Julie Ralph 894747c34c fix(platform-browser/testing-e2e): clean up unused exports from e2e testing helpers (#9387) 2016-06-23 16:14:31 -07:00
Julie Ralph 8d5a312585 chore(api): clean up compiler/testing api (#9520)
Do not export MockXHR, which is a private helper.
2016-06-23 15:52:18 -07:00
Jason Choi 8eb81b3741 ci: add updated ts-api-guardian check 2016-06-23 14:26:40 -07:00
Jason Choi 22d8f73bc9 test: add public api golden files
Includes a few style fixes on "* as foo" imports.
2016-06-23 14:26:40 -07:00
Jason Choi 249a6bdd98 test: upgrade ts-api-guardian to v0.1.2 2016-06-23 14:26:40 -07:00
Martin Probst 3ad81b1beb test(security): simplify integration test. 2016-06-23 13:57:51 -07:00
Martin Probst 5ab0534164 test(security): Ensure xlink:href is not bindable.
The DOM schema does not allow binding any properties to dangerous SVG
attributes/properties. This change adds a smoke test to verify that
behaviour, by testing that `xlink:href` (a sample dangerous property)
is not bindable.

Fixes #9510.
2016-06-23 13:57:51 -07:00
Igor Minar 5150344213 fix(common): add license header to localization.ts 2016-06-23 13:27:43 -07:00
Wojciech Kwiatek 98cef76931 fix(security): no warning when sanitizing escaped html (#9392) (#9413) 2016-06-23 13:06:19 -07:00
Tobias Bosch 6c5b653593 feat(core): add `@Component.precompile` and `ComponentFactoryResolver`
Part to #9467
Closes #9543
2016-06-23 12:10:04 -07:00
Tobias Bosch 9ed8f2d26e fix(compiler): don't inject `viewProviders` into content child elements
E.g. in the following scenario,
`some-directive` should not be able to inject
any view provider that `my-comp-with-view-providers`
declares.

```
<my-comp-with-view-providers>
  <div some-directive></div>
</my-comp-with-view-providers>
```
2016-06-23 12:10:04 -07:00
Tobias Bosch 33a2f86b28 chore: remove stale tsconfig.json
This tsconfig.json prevents fast round trip cycles in VsCode
as it relies on the package-dist folders to be filled.
2016-06-23 12:10:04 -07:00
Victor Berchet fed1672a43 refactor(i18n): I18nPipe uses NgLocalization (#9313)
and some refactoring
2016-06-23 11:44:05 -07:00
Alex Eagle 54dbed4f48 fix(typings): don't test compiler-cli typings on TS 1.8 2016-06-23 10:57:03 -07:00
Pawel Kozlowski df759b8d4b fix(core): improve error message for broken bindings
Fixes #6820

Closes #9536
2016-06-23 19:28:56 +02:00
Kara Erickson 6edf0474cc feat(forms): add support for standalone ngModel dirs inside forms
Closes #9230
2016-06-23 10:16:47 -07:00