137 Commits

Author SHA1 Message Date
Matias Niemelä
e18626b7a2 fix(core): ensure ngFor only inserts/moves/removes elements when necessary (#10287)
Closes #9960
Closes #7239
Closes #9672
Closes #9454
Closes #10287
2016-08-01 11:09:52 -07:00
Marc Laval
b48f7bcb8d fix(forms): normalize written value in NumberValueAccessor
Closes #10379
2016-07-29 18:18:30 +02:00
Matias Niemelä
ba88db5141 fix(ngClass): do not deconstruct classes on element removal (#10303)
Prior to this fix [ngClass] would remove all dynamic classes
when destroyed. It's essential that classes are persisted such
that remove-based animations will still be stylistically correct.
This patch fixes this issue.

Closes #10008
Closes #10303
2016-07-26 15:20:27 -07:00
Kara
0aba42ae5b fix(forms): throw error if wrong control container for reactive forms (#10286) 2016-07-26 10:08:46 -07:00
Tobias Bosch
46b212706b refactor(core): change module semantics
This contains major changes to the compiler, bootstrap of the platforms
and test environment initialization.

Main part of #10043
Closes #10164

BREAKING CHANGE:
- Semantics and name of `@AppModule` (now `@NgModule`) changed quite a bit.
  This is actually not breaking as `@AppModules` were not part of rc.4.
  We will have detailed docs on `@NgModule` separately.
- `coreLoadAndBootstrap` and `coreBootstrap` can't be used any more (without migration support).
  Use `bootstrapModule` / `bootstrapModuleFactory` instead.
- All Components listed in routes have to be part of the `declarations` of an NgModule.
  Either directly on the bootstrap module / lazy loaded module, or in an NgModule imported by them.
2016-07-26 07:04:10 -07:00
Victor Berchet
b652a7fc9f chore: remove obsolete files (#10240) 2016-07-22 16:18:31 -07:00
Victor Berchet
d455942389 fix(CurrencyPipe): use default Intl formatting options when none provided
fixes #10189
2016-07-22 08:21:31 -07:00
Victor Berchet
f3dd91e1d7 feat(NumberPipe): add string support (#10163)
fixes #10159
2016-07-19 11:27:06 -07:00
Victor Berchet
8cd97c2054 refactor(NgFor): cleanup 2016-07-18 10:38:59 -07:00
Cole R Lawrence
32d8cde9c6 docs(NgSwitch): fix typo ngSwitch to NgSwitch (#10143) 2016-07-18 10:24:55 -07:00
vsavkin
e1109d52e1 docs(router): update the docs of LocationPathStrategy 2016-07-14 15:00:50 -07:00
Kara
34feecf60e fix(forms): improve no value accessor error message (#10051) 2016-07-13 14:13:02 -07:00
Victor Berchet
94dc632a6d fix(NgStyle): remove duplicate input declaration (#9978)
fixes #9977
2016-07-11 15:09:04 -07:00
Victor Berchet
eacc9e6541 refactor: misc cleanup 2016-07-08 10:34:22 -07:00
Patrice Chalin
749dec7dfb doc(api): fix invalid doc links (#9873)
Errors were reported during API doc generation.
2016-07-07 23:02:35 -07:00
Victor Berchet
b7e69bc1a1 fix(NgPlural): expression inside cases (#9883)
fixes #9868
2016-07-07 14:47:06 -07:00
Kara
9d265b6f61 feat(forms): add modules for forms and deprecatedForms (#9859)
Closes #9732

BREAKING CHANGE:

We have removed the deprecated form directives from the built-in platform directive list, so apps are not required to package forms with their app. This also makes forms friendly to offline compilation.

Instead, we have exposed three modules:

OLD API:
- `DeprecatedFormsModule`

NEW API:
- `FormsModule`
- `ReactiveFormsModule`

If you provide one of these modules, the default forms directives and providers from that module will be available to you app-wide.  Note: You can provide both the `FormsModule` and the `ReactiveFormsModule` together if you like, but they are fully-functional separately.

**Before:**
```ts
import {disableDeprecatedForms, provideForms} from @angular/forms;

bootstrap(App, [
   disableDeprecatedForms(),
   provideForms()
]);
```

**After:**

```ts
import {DeprecatedFormsModule} from @angular/common;

bootstrap(App, {modules: [DeprecatedFormsModule] });
```

-OR-

```ts
import {FormsModule} from @angular/forms;

bootstrap(App, {modules: [FormsModule] });
```

-OR-

```ts
import {ReactiveFormsModule} from @angular/forms;

bootstrap(App, {modules: [ReactiveFormsModule] });
```

You can also choose not to provide any forms module and run your app without forms.

Or you can choose not to provide any forms module *and* provide form directives at will.  This will allow you to use the deprecatedForms API for some components and not others.

```
import {FORM_DIRECTIVES, FORM_PROVIDERS} from @angular/forms;

@Component({
   selector: some-comp,
   directives: [FORM_DIRECTIVES],
   providers: [FORM_PROVIDERS]
})
class SomeComp
```
2016-07-07 11:32:51 -07:00
Roberto Simonetti
776a83f9da doc(i18nPluralPipe): update API doc example (#9862) 2016-07-07 08:48:37 -07:00
Rob Wormald
3cbded6694 fix(forms): use change event for select multiple (#9713) 2016-06-30 20:24:39 -07:00
Igor Minar
24eb8389d2 fix: public api surface fixes + stability markers
- ts-api-guardian will now error if a new public symbol is added with a stability marker (`@stable`, `@experimental`, `@deprecated`)
- DomEventsPlugin and KeyEventsPlugin were removed from public api surface - these classes is an implementation detail
- deprecated BROWSER_PROVIDERS was removed completely
- `@angular/compiler` was removed from the ts-api-guardian check since this package shouldn't contain anything that users need to directly import
- the rest of the api surface was conservatively marked as stable or experimental

BREAKING CHANGES: DomEventsPlugin and KeyEventsPlugin previously exported from core are no longer public - these classes are implementation detail.

Previously deprecated BROWSER_PROVIDERS was completely removed from platform-browser.

Closes #9236
Closes #9235
Ref #9234
2016-06-28 07:39:40 -07:00
vsavkin
d20488752b fix(router): top-levels do not work in ngIf 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
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
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
Igor Minar
5150344213 fix(common): add license header to localization.ts 2016-06-23 13:27:43 -07:00
Victor Berchet
fed1672a43 refactor(i18n): I18nPipe uses NgLocalization (#9313)
and some refactoring
2016-06-23 11:44:05 -07:00
ScottSWu
ae75e3640a chore(lint): Added license headers to most TypeScript files
Relates to #9380
2016-06-23 09:47:54 -07:00
Victor Berchet
398060d5ff fix(NgSwitch): display deprecation message only once 2016-06-23 08:56:10 -07:00
Victor Berchet
c9c81e1fbc fix(XmbSerializer): add meaning attribute, escape attribute values 2016-06-21 11:52:11 -07:00
Victor Berchet
ca42b49fa2 refactor: misc cleanup (#9369) 2016-06-20 10:55:29 -07:00
Misko Hevery
8675b8dc48 fix: cleanup public api of platform-server
BREAKING CHANGE: Parse5Adapter is no longer exported as public API, use serverBootstrap()

Parse5Adapter is an implementation detail not a public API

Closes #9237

Closes #9205
2016-06-19 09:03:01 -07:00
Andrei Tserakhau
5c8d3154d7 feat(datePipe): numeric string support 2016-06-17 15:58:06 -07:00
Victor Berchet
49bf3f5b3a fix(NumberPipe): fix broken RegExp
introduced in 7498050421196ec4f1c (#9308)
2016-06-17 15:33:25 -07:00
Victor Berchet
7498050421 refactor: misc (#9308) 2016-06-17 10:57:50 -07:00
Kara Erickson
2fd1e88199 fix(forms): suppress forms deprecation warning after first 2016-06-15 08:52:56 -07:00
Kara
22916bb5d1 feat(forms): add easy way to switch between forms modules (#9202) 2016-06-14 18:23:40 -07:00
Kara Erickson
a191e9697c feat(forms): support setting control name in ngModelOptions 2016-06-13 16:57:10 -07:00
Kara Erickson
5c0cfdee48 fix(forms): separate ngModelGroup from formGroupName 2016-06-13 13:41:39 -07:00
Kara Erickson
61960c51a3 feat(forms): compose validator fns automatically if arrays 2016-06-13 11:41:32 -07:00
Kara Erickson
2b8d12ddf0 chore(forms): rename ngControl to formControlName 2016-06-12 13:17:36 -07:00
Kara Erickson
7d9c1e1225 chore(forms): rename ngFormModel to formGroup 2016-06-10 19:10:17 -07:00
Kara Erickson
d53edfec47 chore(forms): rename ngFormControl to formControl 2016-06-10 17:28:19 -07:00
Kara Erickson
b866f32832 chore(forms): rename Control, ControlGroup, and ControlArray classes 2016-06-10 12:00:18 -07:00
Kara Erickson
97833d48c1 chore(templateOutlet): fix linting 2016-06-10 11:32:09 -07:00
Shlomi Assaf
164a091c71 feat(NgTemplateOutlet): add context to NgTemplateOutlet
Closes #9042
2016-06-10 10:25:44 -07:00
Kara Erickson
4ed6cf7519 feat(forms): allow ngModel to register with parent form 2016-06-10 10:24:01 -07:00
Rob Wormald
e1fcab777c fix(ngSwitch): use switchCase instead of switchWhen (#9076) 2016-06-09 22:52:30 -07:00
Alex Eagle
f39c9c9e75 style(lint): re-format modules/@angular 2016-06-09 17:00:15 -07:00
Idir Ouhab Meskine
9146bb0816 docs(DatePipe): Update date doc reference in date_pipe.ts (#9081) 2016-06-09 16:05:13 -07:00