Commit Graph

77 Commits

Author SHA1 Message Date
Miško Hevery 979657989b fix(packages): use ES modules for primary build (#11120) 2016-08-30 18:07:40 -07:00
Alex Eagle 875e66409c fix(closure): prevent closure renaming of testability interface (#11146) 2016-08-29 13:08:28 -07:00
Misko Hevery 7c07bfff97 fix(errors): [2/2] Rename Exception to Error; remove from public API
BREAKING CHANGE:

Exceptions are no longer part of the public API. We don't expect that anyone should be referring to the Exception types.

ExceptionHandler.call(exception: any, stackTrace?: any, reason?: string): void;
change to:
ErrorHandler.handleError(error: any): void;
2016-08-26 10:37:17 -07:00
Igor Minar 811962b2bb refactor: rename SanitizationService to Sanitizer and DomSanitizationService to DomSanitizer (#11085)
BREAKING CHANGE: Previously inconsistently named APIs SanitizationService and DomSanitizationService were renamed to Sanitizer and DomSanitizer
2016-08-25 15:41:19 -07:00
Igor Minar ea2e5521e8 refactor: replace any[] with Provider[] where possible 2016-08-25 13:29:03 -07:00
Igor Minar eb7d8c702c fix(core): FactoryProvider's deps property should be optional 2016-08-25 13:29:03 -07:00
Igor Minar 5d294624fa docs(core): update stability markers for core apis 2016-08-25 13:29:03 -07:00
Matias Niemelä 4f8f8cfc66 feat(animations): make sure animation callback reports the totalTime (#11022)
Closes #11022
2016-08-24 16:55:00 -07:00
Alex Rickabaugh 8b782818f5 feat(linker): Allow configurable module prefixes and suffixes. (#11049) 2016-08-24 16:54:42 -07:00
Igor Minar 4a740f23a4 refactor(core): remove deprecated @Component.directives and @Component.pipes
BREAKING CHANGE: previously deprecated @Component.directives and @Component.pipes support was removed.

All the components and pipes now must be declarated via an NgModule. NgModule is the basic
compilation block passed into the Angular compiler via Compiler#compileModuleSync or #compileModuleAsync.

Because of this change, the Compiler#compileComponentAsync and #compileComponentSync were removed as well -
any code doing compilation should compile module instead using the apis mentioned above.

Lastly, since modules are the basic compilation unit, the ngUpgrade module was modified to always require
an NgModule to be passed into the UpgradeAdapter's constructor - previously this was optional.
2016-08-23 09:59:00 -07:00
Igor Minar a782232ca3 refactor(core): fix typo in private property name 2016-08-23 09:59:00 -07:00
Matias Niemelä 3c561475c8 refactor(animations): add an onStart handler for AnimationPlayer (#10360) 2016-08-22 16:39:52 -07:00
Victor Savkin c631cfc2fd feat(core): add NO_ERRORS_SCHEMA that allows any properties to be set on any element (#10956)
Often it is useful to test a component without rendering certain directives/components
in its template because these directives require some complicated setup.

You can do that by using NO_ERRORS_SCHEMA.

TestBed.configureTestingModule({
  schemas: [NO_ERRORS_SCHEMA]
});

This would disable all schema checks in your tests.
2016-08-19 16:05:34 -07:00
Alex Rickabaugh a0e13b9797 refactor(core): remove deprecated functions ReflectiveInjector.fromResolvedBindings and ResolvedReflectiveBinding (#10819) 2016-08-17 16:53:09 -07:00
Julie Ralph beb79e75bf refactor(various): remove a few lingering but unused deprecated apis (#10896)
Removes deprecated APPLICATION_COMMON_PROVIDERS, as well as some
internal apis that were deprecated.
2016-08-17 16:36:10 -07:00
vsavkin 951ecb4d90 feat(core): update public api 2016-08-17 08:06:32 -07:00
Igor Minar 73a9ee4a05 Remove component resolver (#10858)
* refactor(core): remove deprecated ComponentResolver

BREAKING CHANGE: deprecated ComponentResolver was removed

Please follow deprecation instruction and migrate your code to use ComponentFactoryResolver.

* refactor(common): remove deprecated NgSwitchWhen directive

BREAKING CHANGE: previously deprecated NgSwitchWhen directive was removed, use NgSwitchCase instead
2016-08-16 16:48:32 -07:00
Julie Ralph a86c554a8e refactor(core/testing): remove deprecated ViewMetadata (#10837)
Note that this doesn't actually remove all uses, but makes them
private.
2016-08-16 13:59:06 -07:00
Julie Ralph 4c9900dc3a refactor(testing): remove deprecated testing functions (#10832)
Remove TestComponentBuilder, addProviders, and withProviders. These
were deprecated in rc5 - see the changelog for update information.

Note - this does not actually remove the functions, but makes them
internal only. They will be removed from the codebase entirely
at a later time.
2016-08-15 21:40:37 -07:00
Miško Hevery bec5c5fdad refactor(Provider): remove deprecated provider/bind API (#10652)
Closes #9751

BREAKING CHANGE:

These forms of providers are no longer accepted:
  bind(MyClass).toFactory(...)
  new Provider(MyClass, toFactory: ...)

We now only accept:
  {provider: MyClass, toFactory: ...}
2016-08-15 19:37:42 -07:00
Igor Minar 3f5331be9d refactor(chore): remove deprecated NgZoneError (#10822)
BREAKING CHANGE: previously deprecated NgZoneError has been removed
2016-08-15 16:10:30 -07:00
Chuck Jazdzewski 48751cceae refactor(core): Removed deprecated Query and ViewQuery (#10820)
BREAKING CHANGE: previously deprecated Query and ViewQuery  were removed; see deprecation notice for migration instructions.
2016-08-15 16:07:55 -07:00
Chuck Jazdzewski 4a9745ef78 refactor(core): Remove deprecated DynamicComponentLoader (#10759)
BREAKING CHANGE: previously deprecated DynamicComponentLoader was removed; see deprecation notice for migration instructions.
2016-08-15 16:07:19 -07:00
Igor Minar acc0fe6cf9 refactor(TestBed): remove deprecated TestBed.reset 2016-08-15 14:07:54 -07:00
Igor Minar b238414984 refactor(core): remove previously deprecated SystemJsComponentResolver and SystemJsCmpFactoryResolver
BREAKING CHANGE: previously deprecated SystemJsComponentResolver and SystemJsCmpFactoryResolver have been removed.

Please follow deprecation instructions to migrate your code.
2016-08-15 14:07:54 -07:00
Victor Savkin 60b10134df cleanup(platform): removed webworker and server deprecated apis (#10745) 2016-08-15 13:44:01 -07:00
Igor Minar 3329977ec9 refactor(core): remove deprecated coreBootstrap and coreLoadAndBootstrap
BREAKING CHANGE: previously deprecated coreBootstrap and coreLoadAndBootstrap have been removed.

Please follow deprecation instructions to migrate your code.
2016-08-12 18:07:58 -07:00
Igor Minar f84c3fdc5f refactor(ApplicationRef): remove all previously deprecated ApplicationRef apis
BREAKING CHANGE: All previously deprecated ApplicationRef apis have been removed.

Please follow the deprecation instructions to migrate your code.
2016-08-12 17:59:30 -07:00
Igor Minar 44e1b23813 refactor(PlatformRef): remove deprecated PlatformRef#registerDisposeListener, #disposed, #dispose()
BREAKING CHANGE: previously deprecated PlatformRef#registerDisposeListener, #disposed, #dispose() - follow deprecation instructions to upgrade
2016-08-12 17:59:30 -07:00
Chuck Jazdzewski d2825077b1 fix(core): Removed depricated disposePlatform
BREAKING CHANGE: previously deprecated disposePlatform was removed; see deprecation notice for migration instructions.
2016-08-12 17:52:13 -07:00
Chuck Jazdzewski 156a52e390 refactor(core): Removed deprecated properties and events from metadata (#10753)
BREAKING CHANGE: previously deprecated DirectiveMetadataType#properties and DirectiveMetadataType#events were removed; see deprecation notice for migration instructions.
2016-08-12 17:44:44 -07:00
Chuck Jazdzewski bb7221f922 refactor(facade): Removed unnecessary override and deprecation. (#10761) 2016-08-12 17:41:12 -07:00
Chuck Jazdzewski 2eb4ee8393 refactor(core): Removed depricated lockRunMode (#10763)
BREAKING CHANGE: previously deprecated lockRunMode was removed; see deprecation notice for migration instructions.
2016-08-12 17:40:22 -07:00
Chuck Jazdzewski a235ae16ed refactor(core): Removed deprecated DebugNode.inject() (#10751)
BREAKING CHANGE: previously deprecated DebugNode#inject was removed, see deprecation notice for migration instructions.
2016-08-12 15:57:23 -07:00
Matias Niemelä 6580d67875 feat(i18n): pass translation config directly into ngc (#10622) 2016-08-12 14:45:36 -07:00
Miško Hevery b96869afd2 refactor(Type): merge Type and ConcreType<?> into Type<?> (#10616)
Closes #9729

BREAKING CHANGE:

`Type` is now `Type<T>` which means that in most cases you have to
use `Type<any>` in place of `Type`.

We don't expect that any user applications use the `Type` type.
2016-08-10 18:21:28 -07:00
Julie Ralph d75502eeee refactor(testing): remove deprecated test setup functions (#10600)
Remove test setup functions which were deprecated in rc5. See the
changelog for rc5 for how to update. In brief, instead of
`setBaseTestProviders`, use `TestBed.initTestEnvironment`.
2016-08-09 10:46:28 -07:00
Patrice Chalin 2b704f0586 fix(linker/compiler): rename const to avoid duplicate declaration (#10457)
Currently in the `linker/compiler.ts` file, the **same identifier** is used in **two declarations**:
```typescript
export type CompilerOptions = { … }
…
export const CompilerOptions = new OpaqueToken('compilerOptions');
```
This breaks the API doc generation. I’m surprised that this was not flagged by the tsc.

The duplicate declaration was introduced in 46b212706b.
2016-08-04 11:31:58 -07:00
Tobias Bosch 3d53b33391 chore: update public api and integrate minor review comments 2016-08-02 11:23:26 -07:00
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
Hans 4df7b1cfbc chore: fixes some issues that happen with closure compiler. (#10392) 2016-08-01 09:47:49 -07:00
Tobias Bosch a46437c57d refactor(core): fix `bootstrapModule` regarding zones and initializers (#10383)
This makes `bootstrapModuleFactory` wait for promises
returned by `APP_INITIALIZER`s, also making `bootstrapModuleFactory` async.
I.e. now `bootstrapModule` and `bootstrapModuleFactory` behave in the
same way.

This ensures that all code from module instantiation, to creating
`ApplicationRef`s as well as calling `APP_INITIALIZERS` is run
in the Angular zone.

This also moves the invocation of the initializers from the `ApplicationRef`
constructor into the `bootstrapModuleFactory` call, allowing initializers
to get a hold of `ApplicationRef` (see #9101).

Fixes #9101
Fixes #10363
Fixes #10205
2016-08-01 02:12:59 -07:00
Tobias Bosch 0eca7abdd8 chore: update public api
Closes #10355
2016-07-29 04:47:50 -07:00
Hans a67cc8229d chore: move injector to being non-internal but private (#10339)
* chore: move injector to being non-internal but private

* Add the new non-internal method to the public API.
2016-07-28 10:38:29 -07:00
Tobias Bosch b42411ba1f chore: update public api
- `precompile` -> `entryComponents`
- introduce `ModuleWithProviders`
- introduce `@NgModule.schema`
- update to bootstrap

Closes #10268
2016-07-26 07:45:40 -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
PatrickJS 190bcc89c1 refactor(EventEmitter): optional emits (#10058)
the Subject#next is optional
2016-07-22 10:19:57 -07:00
Julie Ralph b43f95435b fix(testing): add an explicit doAsyncPrecompilation step (#10015)
This removes the magic from the `inject` test helper that would inspect
the current zone and would only work with our `async` test helper.
Now, `inject` is always synchronous, and if you are using a module
that requires async precompilation, you're required to call
`doAsyncPrecompilation` in your tests.

This is part of the breaking changes introduced with the swap
to each test having an AppModule.

Closes #9975
Closes #9593

BREAKING CHANGE:

`TestInjector` is now renamed to `TestBed`

Before:

```js
import {TestInjector, getTestInjector} from '@angular/core/testing';
```

After:

```js
import {TestBed, getTestBed} from '@angular/core/testing';
```
2016-07-20 10:51:21 -07:00
Victor Berchet b6746cce9c refactor(decorators): cleanup 2016-07-18 10:38:59 -07:00
vsavkin 0426325ef7 fix(router): merge SystemJsAppModuleFactoryLoader and SystemJsAllModuleLoader 2016-07-13 11:16:46 -07:00