Commit Graph

147 Commits

Author SHA1 Message Date
3fec27961e fix: support *directive on <template> (#9691)
fixes #7315
2016-06-28 21:53:41 -07:00
9340e1b065 docs(security): security api doc update and fix stability marker for Type 2016-06-28 14:01:48 -07:00
5ee84fe0f6 refactor: add types (#9606)
relates to #9100
2016-06-28 11:35:59 -07:00
bf598d6b8b feat(compiler): support sync runtime compile
Adds new abstraction `Compiler` with methods
`compileComponentAsync` and `compileComponentSync`.
This is in preparation of deprecating `ComponentResolver`.

`compileComponentSync` is able to compile components
synchronously given all components either have an inline
template or they have been compiled before.

Also changes `TestComponentBuilder.createSync` to
take a `Type` and use the new `compileComponentSync` method.

Also supports overriding the component metadata even if
the component has already been compiled.

Also fixes #7084 in a better way.

BREAKING CHANGE:
`TestComponentBuilder.createSync` now takes a component type
and throws if not all templates are either inlined
are compiled before via `createAsync`.

Closes #9594
2016-06-28 10:26:16 -07:00
e12b1277df feat(core): split ChangeDetectorStrategy into ChangeDetectionStrategy and ChangeDetectorStatus 2016-06-27 20:19:20 -07:00
e0b0a594bb fix(animations): ensure void => * animations are triggered when an expression is omitted
Closes #9327
Closes #9381
2016-06-27 18:55:10 -07:00
5cc7b41f39 Revert "fix(Compiler): relax childIsRecursive check (#8705)"
This fix prevented waiting for child components even if the cycle was only introduced via the `directives` array, i.e. without actually having a cycle. This easily causes issues for applications that have one shared list of directives for all components.

This reverts commit 3d5bb23184.

Closes #9647
2016-06-27 14:27:03 -07:00
6c5b653593 feat(core): add @Component.precompile and ComponentFactoryResolver
Part to #9467
Closes #9543
2016-06-23 12:10:04 -07:00
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
df759b8d4b fix(core): improve error message for broken bindings
Fixes #6820

Closes #9536
2016-06-23 19:28:56 +02:00
ae75e3640a chore(lint): Added license headers to most TypeScript files
Relates to #9380
2016-06-23 09:47:54 -07:00
098b461b69 fix(core): report duplicate template bindings in templates
Fixes #7315

BREAKING CHANGES:

Previously multiple template bindings on one element
(ex. `<div *ngIf='..' *ngFor='...'>`) were allowed but most of the time
were leading to undesired result. It is possible that a small number
of applications will see template parse errors that shuld be fixed by
nesting elements or using `<template>` tags explicitly.

Closes #9462
2016-06-23 15:59:07 +02:00
3d5bb23184 fix(Compiler): relax childIsRecursive check (#8705)
Fix how the compiler checks for recursive components by also considering
component descendants. Previously, it only checked if the current
component was evaluated previously. This failed in certain cases of
mutually recursive components, causing `createAsync` in tests to not
resolve.

closes [7084](https://github.com/angular/angular/issues/7084)
2016-06-22 07:02:11 -07:00
397f5e2390 refactor(HtmlLexer): simplify the code 2016-06-21 18:03:22 -07:00
1a212259af refactor: cleanup lexers & parsers 2016-06-21 18:03:22 -07:00
f114dd300b fix(core): properly report missing providers and viewProviders (#9411)
Fixes #8237
2016-06-21 17:27:27 -07:00
c9c81e1fbc fix(XmbSerializer): add meaning attribute, escape attribute values 2016-06-21 11:52:11 -07:00
e38e04c1c2 refactor(MessageExtractor): pass the interpolationConfig around 2016-06-21 11:52:11 -07:00
99587ea4ed refactor(i18n): misc 2016-06-21 11:52:11 -07:00
58b18d7fe7 fix(partition): fix partition when <!-- i18n --> is the only child 2016-06-21 11:52:11 -07:00
04a50f5832 feat(MessageExtractor): do not expand ICU messages before extraction 2016-06-21 11:52:11 -07:00
e157a065b0 fix(compiler): codegen view query generic types 2016-06-21 11:51:54 -07:00
fdf6bc18dd fix(compiler): properly report unresolved dependencies
Fixes #9332

Closes #9341
2016-06-21 16:36:57 +02:00
1b28cf71f5 feat(compiler): make interpolation symbols configurable (@Component config) (#9367)
closes #9158
2016-06-20 09:52:41 -07:00
c0f2a22a08 fix(perf): support prod mode again
After splitting the facades into multiple modules,
enabling prod mode for code had no effect for the compiler.

Also in a change between RC1 and RC2 we created the `CompilerConfig`
via a provider with `useValue` and not via a `useFactory`, which reads
the prod mode too early.

Closes #9318
Closes #8508
Closes #9318
2016-06-17 15:59:27 -07:00
721f53f0d6 feat(I18N Expander): do not add extra <ul> & <li> around ICU messages (#9283)
fixes #9072
2016-06-17 11:38:24 -07:00
7498050421 refactor: misc (#9308) 2016-06-17 10:57:50 -07:00
45549cda61 refactor(core): get rid of the bitwise operator facade helpers 2016-06-16 14:31:55 -07:00
a13052fc73 refactor(core): rename css_parser and css_lexer files
Closes #9273
2016-06-16 14:31:48 -07:00
4e7bb03e81 refactor(core): rename AST to Ast for all CSS parser code 2016-06-16 14:31:41 -07:00
935c39a7e2 feat(core): ensure CSS parser tracks start/end values and understands complex pseudo selectors 2016-06-16 14:31:34 -07:00
c08ca22dba refactor(HtmlParser): clang format 2016-06-16 13:54:00 -07:00
c60ef45bc8 fix(HtmlParser): add missing ; 2016-06-16 10:23:02 -07:00
1eaa193c51 feat(compiler-cli): add a debug option to control the output
fixes #9208
2016-06-15 18:13:57 -07:00
b620f4f456 feat(DomElementSchemaRegistry): add support for <ng-content> and <ng-container> 2016-06-15 18:13:57 -07:00
e484c62a8d fix(HtmlParser): do not add required parents to template root elements
fixes #5967
2016-06-15 18:13:57 -07:00
9ba400d7d5 fix(HtmlParser): consider <ng-container> when adding required parents 2016-06-15 18:13:57 -07:00
9cbd8f7afc test(ng-container): test nesting ng-containers 2016-06-15 18:13:57 -07:00
8a54c1a115 refactor(ViewBuilder): cleanup 2016-06-14 19:11:30 -07:00
0dbff55bc6 feat(Compiler): add support for <ng-container>
`<ng-container>` is a logical container that can be used to group nodes but is not rendered in the DOM tree as a node.

`<ng-container>` is rendered as an HTML comment.
2016-06-14 19:11:30 -07:00
fe01e2efb7 feat(I18nExtractor): Add file paths to error messages (#9177)
* feat(I18nExtractor): Add file paths to error messages

relates to #9071

* feat(i18n): allow i18n start comments without meaning

* refactor(i18n): cleanup

* test(HtmlParser): Add depth to expansion forms
2016-06-14 17:50:23 -07:00
bc888bf3a1 refactor(compiler): Change arguments of CompilerConfig to named arguments
BREAKIKNG CHANGE:
`CompilerConfig` used to take positional arguments and now takes named arguments.

Closes #9172
2016-06-13 13:14:07 -07:00
1745366530 refactor(compiler): make PLATFORM_PIPES / PLATFORM_DIRECTIVES an option on CompilerConfig
This aligns the configuration of platform pipes / directives with offline compilation.

BREAKING CHANGE:
- `PLATFORM_PIPES` and `PLATFORM_DIRECTIVES` now are fields on `CompilerConfig`. 
  Instead of providing a binding to these tokens, provide a binding for `CompilerConfig` instead.
2016-06-13 13:13:45 -07:00
de97687422 docs(i18n): fix typo (#9165) 2016-06-13 10:00:57 -07:00
1f6fd3c8fc refactor: add types (#9148) 2016-06-11 21:23:37 -07:00
55860e1621 fix(animations): ensure AUTO styles are cleared at the end of the state-change animation
Closes #9014
Closes #9015
2016-06-11 00:08:41 -07:00
a6e5ddc5af feat(ComponentResolver): Add a SystemJS resolver for compiled apps (#9145) 2016-06-10 16:31:34 -07:00
5267115481 feat(I18N): generate error on unknown cases
fixes #9094
2016-06-10 08:45:59 -07:00
43148d8233 feat(HtmlLexer): add support for alphabetic cases 2016-06-10 08:45:59 -07:00
f39c9c9e75 style(lint): re-format modules/@angular 2016-06-09 17:00:15 -07:00