Commit Graph

360 Commits

Author SHA1 Message Date
bd4045b6e7 fix(MetadataResolver): throw Component.moduleId is not a string
fixes #11590
2016-09-15 10:57:37 -07:00
255099aa61 refactor(MetadataResolver): cleanup 2016-09-15 10:57:37 -07:00
b847257b16 refactor(ShadowCss): remove a comment that trigger an issue with webpack (#11587)
fixes #11584
2016-09-13 21:59:11 -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
077e0be1e7 fix(CssSelector): fix getMatchingElementTemplate() for void tags
fixes #11407
2016-09-08 13:55:41 -07:00
a52d076912 refactor(CssSelector): misc 2016-09-08 13:55:41 -07:00
436af15d63 refactor: remove parseFloat from facades (#11446) 2016-09-08 13:54:10 -07:00
6a2bbffe10 fix(animations): allow group() to be used as entry point for an animation trigger (#11419)
Closes #11312
Closes #11419
2016-09-08 12:20:07 -07:00
78ad9adc1a fix(ShadowCss): fix perf regression (#11420)
fixes #11371
2016-09-07 16:48:10 -07:00
3ff816afa6 style(CompileMetadataResolver): better error message (#11401) 2016-09-07 14:09:25 -07:00
ea95c391c1 fix(compiler): error when NgModule.bootstrap contains undefined or null 2016-09-06 11:44:56 -07:00
d309f7799c fix(DomSchema): add missing elements
fixes #11219
2016-09-02 15:35:36 -07:00
93deff6c33 refactor(DomSchema): improve readability by making the schema more explicit using interface names 2016-09-02 15:35:36 -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
562c8263dc fix(animations): ensure animation callbacks are fired for embedded views 2016-08-31 15:46:23 -07:00
1818056912 fix(TemplateParser): disallow event-property binding even with the NO_ERRORS_SCHEMA
closes #11026
2016-08-30 21:32:24 -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
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
38069aba35 fix(compiler): make ShadowCSS shim work on Android browser (#11139)
Fixes #11123
2016-08-29 08:18:55 -07:00
af63378fa0 fix(ShadowCss): properly shim selectors after :host and :host-context (#10997)
fixes #5390

Before the change:

    // original CSS
    :host .foo .bar {...}
    .foo .bar {...}

    // translated to 
    [_nghost-shh-2] .foo .bar {...}
    .foo[_ngcontent-shh-2] .bar[_ngcontent-shh-2] {...}

Note that `.foo` and `.bar` where not scoped and would then apply to nested components.

With this change those selectors are scoped (as they are without  `:host`).

You can explicitly apply the style to inner component by using `>>>` or `/deep/`: `:host >>> .foo`
2016-08-26 16:11:57 -07:00
abad6673e6 fix(ngc): don't quote properties in literal maps (#11110)
Closure compiler treats quoted properties specially, and doesn't rename them.

Fixes #11050
2016-08-26 15:54:34 -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
f25c97671a fix(compiler): handle invalid host bindings and events (#11101) 2016-08-26 10:29:53 -07:00
4d7d2a2daa refactor: remove various leftover unused or deprecated code (#11091) 2016-08-26 09:12:27 -07:00
b867764b0d refactor(template): remove supporter deprecated var / # (#11084)
BREAKING CHANGES:

- `#` and `var` are not supported any more in expressions, use `let`,
- `var-<name>` could not be used any more on templates, use `let-<name>`,
- `var-<name>` could not be used any more to create a reference, use `ref-<name>`.
2016-08-25 15:21:33 -07:00
566d4361e2 refactor: remove obsolete analyzeAppProvidersForDeprecatedConfiguration
closes #11028
2016-08-25 13:29:43 -07:00
ea2e5521e8 refactor: replace any[] with Provider[] where possible 2016-08-25 13:29:03 -07:00
4f8f8cfc66 feat(animations): make sure animation callback reports the totalTime (#11022)
Closes #11022
2016-08-24 16:55:00 -07:00
aa5c8ca61f fix(compiler): throw descriptive error meesage for invalid NgModule providers (#10947)
Fixes #10714
2016-08-23 16:18:41 -07:00
14a30f3ca0 fix(compiler): Correctly handles references to static methods (#11013)
Fixes: #10975
2016-08-23 11:58:12 -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
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
01111b04ff fix(ngc): codegen allows --strictNullChecks (#10991) 2016-08-22 15:30:18 -07:00
8560e1e4bf fix(ngc): comment out a private keyword in codegen. (#10949)
Workaround for b/30775898
2016-08-22 14:28:09 -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
c56f3f2246 fix(compiler): do not autoinclude components declared as entry points (#10898) 2016-08-19 15:59:50 -07:00
cd8cbd3762 fix(ngc): don't codegen foo.d.ngfactory.ts from foo.d.ts (#10833) 2016-08-18 10:11:06 -07:00
c4fd862e15 fix(metadata): throw better errors when components are passed to imports or modules are passed to declarations. (#10888)
Closes #10823
2016-08-17 15:57:02 -07:00
40e160c22c fix(platform-browser-dynamic): Rename CACHED_TEMPLATE_PROVIDER to RESOURCE_CACHE_PROVIDER (#10866)
* fix(platform-browser-dynamic): Rename CACHED_TEMPLATE_PROVIDER to RESOURCE_CACHE_PROVIDER

Closes #9741

BREAKING CHANGE:

`CACHED_TEMPLATE_PROVIDER` is now renamed to `RESOURCE_CACHE_PROVIDER`

Before:

```js
import {CACHED_TEMPLATE_PROVIDER} from '@angular/platform-browser-dynamic';
```

After:

```js
import {RESOURCE_CACHE_PROVIDER} from '@angular/platform-browser-dynamic';
```

* Rename XHR -> ResourceLoader
2016-08-17 09:24:44 -07:00
f12d51992d fix(animations): report errors for missing host-level referenced animations (#10650)
Closes #10650
2016-08-17 08:00:49 -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
9adf80385b fix(animations): remove deprecated trigger APIs (#10825)
BREAKING CHANGE: Animations defined using an at-symbol prefix that are
not property bound are now invalid.

```html
<!-- this is now invalid -->
<div @flip="flipState"></div>

<!-- change that to -->
<div [@flip]="flipState"></div>
```

BREAKING CHANGE: Animations that are not bound using the at-symbol
prefix using `animate-` must now be preixed using `bind-animate-`.

```html
<!-- this is now invalid -->
<div animate-flip="flipState"></div>

<!-- is valid now -->
<div bind-animate-flip="flipState"></div>
```

Closes #10825
2016-08-16 14:09:21 -07:00
f7ff6c5a12 refactor(core): remove deprecated 'bootstrap' (#10831) 2016-08-16 11:15:01 -07:00
f6a7d6504c feat(i18n): xliff integration 2016-08-15 22:28:38 -07:00
96bf42261b fix(XmlHelper): declaration 2016-08-15 22:21:40 -07:00
72bb38f83b feat(i18n): xliff 2016-08-15 22:21:40 -07:00