Commit Graph

351 Commits

Author SHA1 Message Date
d299ce4bcf docs(lifecycle): update docs for lifecycle hooks 2016-09-14 11:51:03 -07:00
7ac47acc1c docs(core): updates docs for query metadata 2016-09-13 11:28:12 -07:00
42a287fabf fix(core): make name in Pipe non optional 2016-09-12 22:47:54 -07:00
42d442dcd5 refactor(core): add a name to all decorators and other fixes 2016-09-12 22:47:54 -07:00
cc2873a94d chore: update typings
Note that the typings don’t reflect the shape of the metadata
due to a bug in the public-api-guard
2016-09-12 22:47:54 -07:00
63e15ffaec refactor(core): remove …Metadata for all decorators and use the decorator directly.
BREAKING CHANGE:
- all `…Metadata` classes have been removed. Use the corresponding decorator
  as constructor or for `instanceof` checks instead.
- Example:
  * Before: `new ComponentMetadata(…)`
  * After: `new Component(…)`
- Note: `new Component(…)` worked before as well.
2016-09-12 22:47:54 -07:00
1b15170c89 refactor(core): simplify decorators
Every decorator now is made of the following:
- a function that can be used
as a decorator or as a constructor. This function
also can be used for `instanceof` checks.
- a type for this function (callable and newable)
- a type that describes the shape of the data
  that the user needs to pass to the decorator
  as well as the instance of the metadata

The docs for decorators live at the followig places
so that IDEs can discover them correctly:
- General description of the decorator is placed on the
  `...Decorator` interface on the callable function
  definition
- Property descriptions are placed on the interface
  that describes the metadata produces by the decorator
2016-09-12 22:47:54 -07:00
051a6ebe12 feat(zone): upgrade to zone.js@0.6.21 2016-09-12 11:48:24 -07:00
436af15d63 refactor: remove parseFloat from facades (#11446) 2016-09-08 13:54:10 -07:00
f78e184822 docs(FactoryProvider): add missing backtick (#11444) 2016-09-08 09:18:37 -07:00
dd03bf12e1 docs: misc fixes.
docs(common_module): Fix macro format
docs(number_pipe): Add missing period sign
docs(date_pipe): Fix suffix consistency
docs(date_pipe): Fix missing quote
docs(number_pipe): Fix incorrect article

Looks like the word "Polyfill" does not start with a vowel pronunciation.

docs(location_strategy): Fix code format

Add missing \`\`\` at start.

docs(i18n_plural_pipe): Fix code format
docs(location): Add missing period sign
refactor(ngSwitch): fix typo on parameter
docs(di): Add missing quote
docs(compiler): Fix typo
docs(compiler): Add missing period sign
docs(directives): Fix description for styles parameter
docs(location_strategy): Add code language

Revert for misunderstanding.
2016-09-06 15:45:37 -07:00
d26a827494 fix(lazy-loading): fix an issue with webpack and lazy loader. (#11387)
The issue was introduced in PR#11049.
2016-09-06 12:06:18 -07:00
aa9b617c9d fix(compiler): correctly type event handler proxy functions 2016-09-06 11:44:56 -07:00
ebc8e808a9 feat(router): register NgModuleFactory objects. (#11211)
When lazily loading code, users need to be able to get hold of the
NgModuleFactory. For SystemJS environments, the SystemJS registry serves
this purpose. However other environments, such as modules compiled with
Closure compiler, do not expose exports object or a path based registry.

For these environments, `@NgModule` objects can include an identifier, and
the loading code can then pass `loadModule(id).then(() =>
getNgModule(id))` to the router.
2016-09-01 13:46:08 -07:00
c9e5b599e4 fix(animations): ensure parent animations are triggered before children (#11201) 2016-09-01 13:24:26 -07:00
0bb94df1da docs(core): docs fixes (#11212) 2016-09-01 11:45:59 -07:00
f4f6f4b4d8 fix(core): don't require reflect-metadata shim when in AOT mode 2016-08-31 15:10:09 -07:00
cc89ef6c8c fix(core): report errors for missing di tokens correctly (#11209) 2016-08-31 14:47:56 -07:00
1df69cb4d2 fix(DomSchemaRegistry): detect invalid elements 2016-08-30 21:32:03 -07:00
979657989b fix(packages): use ES modules for primary build (#11120) 2016-08-30 18:07:40 -07:00
875e66409c fix(closure): prevent closure renaming of testability interface (#11146) 2016-08-29 13:08:28 -07:00
d7de5c4f8e refactor(compiler): replace CompileIdentifierMap with regular Map
closes #11145

Also rename `CompileIdentifierMetadata.runtime` into `CompileIdentifierMetadata.reference`.

Also remove `CompileIdentifierMetadata.equalsTo` as
now it is enough to just check the `reference` fields for equality.
2016-08-29 12:45:27 -07:00
51877ef4ed fix(compiler): no longer uses assetCacheKey for token identity.
Fixes #10545, Fixes #10538
2016-08-29 12:45:02 -07:00
27539c8b80 refactor(example): refactor forward_ref example into a spec and unignore example specs (#11088) 2016-08-26 15:40:46 -07:00
9ce8ef76bf fix(ErrorHandler): make rethrowError internal so that the interface can be implemented (#11109) 2016-08-26 14:43:42 -07:00
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
86ba072758 fix(errors): [1/2] Rename Exception to Error; remove from public API 2016-08-26 10:37:17 -07:00
b9647b7347 fix(i18n): change default locale from en_US to en-US (#11103) 2016-08-26 10:30:10 -07:00
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
ea2e5521e8 refactor: replace any[] with Provider[] where possible 2016-08-25 13:29:03 -07:00
eb7d8c702c fix(core): FactoryProvider's deps property should be optional 2016-08-25 13:29:03 -07:00
5d294624fa docs(core): update stability markers for core apis 2016-08-25 13:29:03 -07:00
dc6f72e963 fix(closure): replace property accesses (#11078)
Accessing a property on the window object must be done with square brackets.
Otherwise closure compiler may collide the symbol's alias between the property
and variable mappings.
Also, accessing the 'provide' property must be done with dot syntax, so that
it can be renamed along with the code that declares such a property.
2016-08-25 11:12:06 -07:00
4f8f8cfc66 feat(animations): make sure animation callback reports the totalTime (#11022)
Closes #11022
2016-08-24 16:55:00 -07:00
8b782818f5 feat(linker): Allow configurable module prefixes and suffixes. (#11049) 2016-08-24 16:54:42 -07:00
bd510ccdbb fix(core): assigns an overriden name to constructor named constructor (#11043)
Fixes #10545
2016-08-24 10:21:13 -07:00
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
a782232ca3 refactor(core): fix typo in private property name 2016-08-23 09:59:00 -07:00
45e8e73670 refactor(animations): deport TCB away from animation-land forever (#10892)
* feat(animations): support animation trigger template callbacks

* refactor(animations): deport TCB away from animation-land forever
2016-08-22 17:18:25 -07:00
3c561475c8 refactor(animations): add an onStart handler for AnimationPlayer (#10360) 2016-08-22 16:39:52 -07:00
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
a0e13b9797 refactor(core): remove deprecated functions ReflectiveInjector.fromResolvedBindings and ResolvedReflectiveBinding (#10819) 2016-08-17 16:53:09 -07:00
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
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
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
f7ff6c5a12 refactor(core): remove deprecated 'bootstrap' (#10831) 2016-08-16 11:15:01 -07:00
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
3f5331be9d refactor(chore): remove deprecated NgZoneError (#10822)
BREAKING CHANGE: previously deprecated NgZoneError has been removed
2016-08-15 16:10:30 -07:00
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
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