Tobias Bosch
f6710fefeb
refactor(compiler): make `view.disposable` array null if empty
2016-11-01 11:29:15 -07:00
Tobias Bosch
bda1909ede
refactor(compiler): remove `view.rootNodes` and `view.projectableNodes`
...
They are replaced by generated visitor functions `view.visitRootNodes` / `view.visitProjectableNodes`.
2016-11-01 11:29:15 -07:00
Tobias Bosch
b3e3cd3add
refactor(compiler): inline `view.contentChildren`
2016-11-01 11:29:14 -07:00
Tobias Bosch
e5fdf4c70a
refactor(compiler): inline view.viewChildren in generated code
2016-11-01 11:29:14 -07:00
Tobias Bosch
97471d74b6
refactor(compiler): remove unused `subscriptions` in view
2016-11-01 11:29:14 -07:00
Tobias Bosch
a178bc6c83
fix(compiler): dedupe NgModule declarations, …
...
This is important so that we don’t generate things multiple times.
2016-10-31 14:43:50 -07:00
Tobias Bosch
642c1db9ef
fix(compiler): Don’t throw on empty property bindings
...
Closes #12583
2016-10-31 14:43:50 -07:00
Zaven Muradyan
e9fd8645ed
fix(core): improve error when multiple components match the same element
...
Closes #7067
2016-10-31 11:28:03 -07:00
Tobias Bosch
e391cacdf9
fix(compiler): don’t double bind functions
...
This fixes a performance regressions introduced by 178fb79b5c
.
Also makes properties in the directive wrapper private
so that closure compiler can minify them better.
2016-10-28 11:17:12 -07:00
Tobias Bosch
32feb8a532
refactor(compiler): generate host listeners in DirectiveWrappers
...
Part of #11683
2016-10-27 16:09:01 -07:00
Jan Kuri
7742ec00e7
fix: remove double exports of template_ast
2016-10-26 15:14:00 -07:00
Dzmitry Shylovich
d321b0ebf5
fix(selectors): use Maps instead of objects
2016-10-26 14:55:59 -07:00
Tobias Bosch
178fb79b5c
refactor(compiler): move host properties into DirectiveWrapper
...
Part of #11683
2016-10-26 14:32:24 -07:00
Tobias Bosch
f66ac821a2
refactor(compiler): extract `createCheckBindingStmt` into `compiler_util`
...
Part of #11683
2016-10-26 14:32:24 -07:00
Tobias Bosch
fe299f4dfc
refactor(compiler): minor cleanups
2016-10-26 14:32:24 -07:00
Tobias Bosch
4cac650675
refactor(compiler): extract expression evaluation and writing to renderer from view_compiler
...
This is needed to that `DirectiveWrapper`s can also use them later on.
Part of #11683
2016-10-26 14:32:24 -07:00
Tobias Bosch
cb7643ccea
refactor(compiler): introduce `ClassBuilder`.
...
Part of #11683
2016-10-26 14:32:23 -07:00
Tobias Bosch
faa3478514
refactor(compiler): set element attributes via one call
...
This makes the cost of using directives that have host attributes
smaller.
Part of #11683
2016-10-26 14:32:23 -07:00
Tobias Bosch
bc3f4bc816
refactor(compiler): extract BindingParser
...
Needed so that we can parse directive host bindings independent of templates.
Part of #11683
2016-10-26 14:32:23 -07:00
Victor Berchet
7221632228
fix(CompilerCli): assert that all pipes and directives are declared by a module
2016-10-25 18:17:18 -07:00
Victor Berchet
a838aba756
fix(compiler): walk third party modules ( #12453 )
...
fixes #11889
fixes #12428
2016-10-24 22:28:23 +02:00
Victor Berchet
57051f01ce
refactor: remove most facades ( #12399 )
2016-10-21 15:14:44 -07:00
Tobias Bosch
867494a060
fix(compiler): don't access view local variables nor pipes in host expressions ( #12396 )
...
Fixes #12004
Closes #12071
2016-10-20 15:24:58 -07:00
Tobias Bosch
b0a03fcab3
refactor(compiler): introduce directive wrappers to generate less code
...
- for now only wraps the `@Input` properties and calls
to `ngOnInit`, `ngDoCheck` and `ngOnChanges` of directives.
- also groups eval sources by NgModule.
Part of #11683
2016-10-20 10:41:43 -07:00
Tobias Bosch
acda82c1ed
refactor(compiler): remove private exports
...
All of `@angular/compiler` is private, so we can export
everything we need directly.
2016-10-20 10:41:43 -07:00
Victor Berchet
76dd026447
refactor: remove some facades ( #12335 )
2016-10-19 13:42:39 -07:00
Alex Eagle
cca4a5c519
fix(compiler): don't redeclare a var in the same scope ( #12386 )
...
This is not allowed by Closure Compiler.
2016-10-18 20:28:30 -07:00
Matias Niemelä
6e5f8b59b3
fix(animations): generate aot code for animation trigger output events ( #12291 )
...
Closes #11707
Closes #12291
2016-10-18 17:16:51 -07:00
Victor Berchet
38e2203b24
refactor(core): delete unused reflector code
2016-10-17 23:17:34 -07:00
Victor Berchet
f7db0668d1
refactor(core): simplify & cleanup reflection
2016-10-17 23:17:34 -07:00
Matias Niemelä
33c8948fd3
refactor(animations): ensure animation data-structures are created only when used
...
Closes #12250
2016-10-14 15:43:41 -07:00
Victor Berchet
df1718d624
fix(compiler): allow WS as `<ng-content>` content ( #12225 )
2016-10-12 07:58:06 -07:00
Chuck Jazdzewski
7275e1beb3
refactor(compiler): add optional `visit()` to `TemplateAstVisitor` ( #12209 )
2016-10-11 15:46:11 -07:00
Chuck Jazdzewski
12ba62e5e2
refactor(compiler): expose template parser phases ( #12210 )
2016-10-11 15:45:27 -07:00
Victor Berchet
e6e007e2f1
refactor(core): cleanup SpyObject ( #12221 )
2016-10-11 15:44:48 -07:00
Victor Berchet
d972d82354
refactor: simplify `isPresent(x) ? x : y` to `x || y` ( #12166 )
...
Closes #12166
2016-10-10 09:20:58 -07:00
Victor Berchet
bdcf46f82e
refactor(compiler): improve types, misc
2016-10-10 09:20:58 -07:00
Victor Berchet
aa92512ac6
fix(compiler): properly shim `:host:before` and `:host(:before)` ( #12171 )
...
fixes #12165
2016-10-10 09:15:15 -07:00
Chuck Jazdzewski
4202936bbf
refactor(compiler): add optional `visit()` to html AST `Visitor` ( #12135 )
2016-10-10 09:13:50 -07:00
Chuck Jazdzewski
e1faca6386
refactor(compiler): template element ast has endSourceSpan ( #12138 )
2016-10-10 09:12:05 -07:00
Victor Berchet
13ecc140e8
fix(compiler): validate `@HostBinding` name ( #12139 )
...
relates to #7500
2016-10-07 13:53:53 -07:00
Chuck Jazdzewski
709a6dea06
refactor(compiler): attribute ast records span of the value ( #12132 )
2016-10-07 13:53:29 -07:00
Chuck Jazdzewski
16cfb88c00
refactor(compiler): refactor `analyzeModules()` out of `OfflineCompiler` ( #12137 )
2016-10-07 13:52:53 -07:00
Chuck Jazdzewski
d641c36a45
fix(compiler): interpolation expressions report the correct offset ( #12125 )
2016-10-06 15:22:10 -07:00
Alex Eagle
8c975ed156
refactor(facade): inline StringWrapper ( #12051 )
2016-10-06 15:10:27 -07:00
Victor Berchet
cf269d9ff4
refactor: add license header to JS files & format files ( #12081 )
2016-10-04 20:39:20 -07:00
Victor Berchet
50c37d45dc
refactor: simplify arrow functions ( #12057 )
2016-10-04 15:57:37 -07:00
Victor Berchet
a63359689f
fix(ShadowCss): fix attribute selectors in :host and :host-context ( #12056 )
...
Fix a regression introduced in #11917 while fixing #6249
2016-10-04 15:40:31 -07:00
Chuck Jazdzewski
43d3a84df3
Revert "refactor: add license header to JS files & format files ( #12035 )"
...
This reverts commit 8310c91823
.
2016-10-04 14:06:41 -07:00
Victor Berchet
8310c91823
refactor: add license header to JS files & format files ( #12035 )
2016-10-04 13:15:49 -07:00
Alex Eagle
b64b5ece65
refactor(facade): Remove most of StringMapWrapper facade. ( #12022 )
...
This change mostly automated by
12012b07a2
with some manual fixes.
2016-10-03 16:46:05 -07:00
Victor Berchet
af520947aa
test(AstSerializer): fix serializing void tags
2016-09-30 17:59:43 -07:00
Victor Berchet
040bf57966
fix(xlif): fix `<x>` ctype names
...
fixes #12000
see http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#ctype
2016-09-30 17:59:43 -07:00
Victor Berchet
65a60b7456
style(I18N): Carriage returns in serialized files
2016-09-30 17:59:43 -07:00
Victor Berchet
9316f95467
fix(ShadowCss): support `@page` and `@document` CSS rules ( #11878 )
...
fixes #11860
2016-09-30 16:26:24 -07:00
Victor Berchet
83d94b7504
fix(ShadowCss): support quoted attribute values
...
fixes #6085
2016-09-30 14:37:41 -07:00
Victor Berchet
a121136fae
refactor(ShadowCss): add missing types
2016-09-30 14:37:41 -07:00
Victor Berchet
a6bb84e02b
fix(ShadowCss): fix `:host(tag)` and `:host-context(tag)`
...
fixes #11972
2016-09-30 14:37:41 -07:00
Victor Berchet
1c012a035f
refactor(CssSelector): misc cleanup
2016-09-30 11:06:24 -07:00
Victor Berchet
38c5304b7f
docs(CssSelector): `[name*=value]` is not supported
...
fixes #6042
2016-09-30 11:06:24 -07:00
Victor Berchet
6c4ec05a4a
fix(ShadowCss): support `[attr="value with space"]`
...
fixes #6249
2016-09-30 10:27:35 -07:00
Victor Berchet
f7bfda31ff
refactor(ShadowCss): cleanup
2016-09-30 10:27:35 -07:00
Victor Berchet
a92b573309
test(DirectiveResolver): test that a prop can have both `@Input` and `@HostBinding`
2016-09-30 10:08:52 -07:00
Victor Berchet
4fd13d71c8
refactor(DirectiveResolver): cleanup
2016-09-30 10:08:52 -07:00
Alex Eagle
0286956107
refactor(facade): Inline isBlank called with object-type argument ( #11992 )
2016-09-30 09:26:53 -07:00
Matias Niemelä
e884f4854d
feat(animations): provide aliases for :enter and :leave transitions ( #11991 )
2016-09-30 09:15:56 -07:00
Alex Eagle
41c8c30973
chore(lint): remove unused imports ( #11923 )
...
This was done automatically by tslint, which can now fix issues it finds.
The fixer is still pending in PR https://github.com/palantir/tslint/pull/1568
Also I have a local bugfix for https://github.com/palantir/tslint/issues/1569
which causes too many imports to be deleted.
2016-09-27 17:12:25 -07:00
Marc Laval
61129fa12d
fix(compiler): move detection of unsafe properties for binding to ElementSchemaRegistry ( #11378 )
2016-09-27 17:10:02 -07:00
vikerman
3a5b4882bc
fix(compiler): Do not embed templateUrl in view factories in non-debug mode. ( #11818 )
...
Fixes #11117 .
2016-09-27 17:09:44 -07:00
Victor Berchet
425c1e6042
refactor: remove dead code
2016-09-27 16:13:09 -07:00
Victor Berchet
58605cf350
refactor(facade): remove useless facades
2016-09-27 16:13:09 -07:00
Rado Kirov
52f5ae1961
chore(compiler): followup fix for PR#11846 ( #11870 )
...
Original PR set [] to any, but any[], is a tighter type and still
works for SNC enabled consumers of the emit.
2016-09-24 07:13:05 +09:00
Matias Niemelä
f1b6c6efa1
refactor(animations): ensure animation input/outputs are managed within the template parser ( #11782 )
...
Closes #11782
Closes #11601
Related #11707
2016-09-24 05:37:04 +09:00
Rado Kirov
3ef5ede6d6
chore(compiler): emit ([] as any[]) instead of purely []. ( #11846 )
...
In SNC mode `[]` has type of never[], so we cast it to any[] to
typecheck correctly see
https://github.com/Microsoft/TypeScript/issues/10479 .
This is temporary workaround, until we fully
migrate the framework to TS 2.0 and strictNullChecks.
2016-09-24 02:21:59 +09:00
Victor Berchet
f23b22a0f4
refactor: misc cleanup
2016-09-22 11:01:16 -07:00
Victor Berchet
c041b93418
refactor(TemplateParser): clearer error message for on* binding ( #11802 )
...
fixes #11756
2016-09-22 10:31:18 -07:00
Chuck Jazdzewski
131626fc61
fix(compiler): Safe property access expressions work in event bindings ( #11724 )
2016-09-20 14:54:53 -07:00
Victor Berchet
671f73448c
refactor: misc cleanup ( #11654 )
2016-09-19 17:15:57 -07:00
Victor Berchet
70488ed382
fix(OfflineCompiler): support older TS versions ( #11734 )
2016-09-19 15:36:25 -07:00
Victor Berchet
03aedbe54b
fix(OfflineCompiler): Do not provide I18N values when they're not specified
...
fixes #11643
2016-09-19 10:44:33 -07:00
Victor Berchet
8395aab25d
refactor(OfflineCompiler): cleanup
2016-09-19 10:44:33 -07:00
Brandon
2300c23332
fix(docs): Fixed wording for NgModule schemas ( #11620 )
2016-09-18 16:03:43 -07:00
esagawe
734b8b8c13
fix(compiler): [attribute~=value] selector ( #11696 )
...
Change the seperator regular expression to ignore tildes which are followed by an equal sign.
Closes #9644
2016-09-18 15:58:19 -07:00
Victor Berchet
bd4045b6e7
fix(MetadataResolver): throw Component.moduleId is not a string
...
fixes #11590
2016-09-15 10:57:37 -07:00
Victor Berchet
255099aa61
refactor(MetadataResolver): cleanup
2016-09-15 10:57:37 -07:00
Igor Minar
cb657c4b55
docs: update descriptions in package.jsons
2016-09-14 16:44:39 -07:00
Victor Berchet
b847257b16
refactor(ShadowCss): remove a comment that trigger an issue with webpack ( #11587 )
...
fixes #11584
2016-09-13 21:59:11 -07:00
Tobias Bosch
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
Tobias Bosch
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
Rob Wormald
d296298282
fix(build): prevent package tsconfigs from shadowing main tsconfig ( #11454 )
2016-09-08 15:01:22 -07:00
Victor Berchet
077e0be1e7
fix(CssSelector): fix `getMatchingElementTemplate()` for void tags
...
fixes #11407
2016-09-08 13:55:41 -07:00
Victor Berchet
a52d076912
refactor(CssSelector): misc
2016-09-08 13:55:41 -07:00
Pawel Kozlowski
436af15d63
refactor: remove parseFloat from facades ( #11446 )
2016-09-08 13:54:10 -07:00
Matias Niemelä
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
Victor Berchet
78ad9adc1a
fix(ShadowCss): fix perf regression ( #11420 )
...
fixes #11371
2016-09-07 16:48:10 -07:00
PatrickJS
3ff816afa6
style(CompileMetadataResolver): better error message ( #11401 )
2016-09-07 14:09:25 -07:00
Tobias Bosch
ea95c391c1
fix(compiler): error when `NgModule.bootstrap` contains `undefined` or `null`
2016-09-06 11:44:56 -07:00
Victor Berchet
d309f7799c
fix(DomSchema): add missing elements
...
fixes #11219
2016-09-02 15:35:36 -07:00
Victor Berchet
93deff6c33
refactor(DomSchema): improve readability by making the schema more explicit using interface names
2016-09-02 15:35:36 -07:00
Martin Probst
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