5063 Commits

Author SHA1 Message Date
Victor Berchet
3f519207a4 refactor(compiler): misc + add a test for directives on inline templates 2017-02-23 20:03:16 -08:00
Dzmitry Shylovich
ee747f7d0c refactor(core): change abstract classes for interfaces ()
BREAKING CHANGE: Because all lifecycle hooks are now interfaces
the code that uses 'extends' keyword will no longer compile.

To migrate the code follow the example below:

Before:
```
@Component()
class SomeComponent extends OnInit {}
```
After:
```
@Component()
class SomeComponent implements OnInit {}
```

we don't expect anyone to be affected by this change.

Closes 
2017-02-23 18:04:51 -08:00
Chuck Jazdzewski
a23634dfd0 fix(common): do not reference deprecated classes in providers () ()
References to `NgFor` are now an alias for `NgForOf` instead of a
derived class.

Fixes 
2017-02-23 17:23:56 -08:00
Jason Aden
c53621be8e build: resolve review comments on flat modules PR and fix more bugs () 2017-02-23 16:39:44 -08:00
Tobias Bosch
4b54c0e23f refactor(core): enable new animations dsl
Also deletes old tests that are not needed any
more with the new view engine.
2017-02-23 13:59:16 -08:00
Tobias Bosch
ccb636c2e9 refactor: deprecate RootRenderer / Renderer
Use `RendererV2` instead of `Renderer` now. `Renderer` can still be injected
and delegates to `RendererV2`.

Use `RendererFactoryV2` instead of `RootRenderer`. `RootRenderer` cannot be used
anymore.

BREAKING CHANGE:
- `RootRenderer` cannot be used any more, use `RendererFactoryV2` instead.
  Note: `Renderer` can still be injected/used, but is deprecated.
2017-02-23 13:59:16 -08:00
Tobias Bosch
d3a98c74d6 feat(core): enable new view engine 2017-02-23 13:59:16 -08:00
Matias Niemelä
187f7b68f2 refactor(animations): always remove elements right away unless they have a leave animation 2017-02-23 13:02:45 -08:00
Matias Niemelä
835e18709d refactor(animations): always flush animations when inserting children 2017-02-23 13:02:45 -08:00
Matias Niemelä
36b78e9502 refactor(animations): defer the noop engine's event deregistration 2017-02-23 13:02:45 -08:00
Tobias Bosch
4301dce7b0 fix(packaging): properly build the core-testing bundle 2017-02-23 12:57:07 -08:00
Tobias Bosch
6277f16187 fix: small fixes for view engine 2017-02-23 12:57:07 -08:00
Matias Niemelä
e8d2743cfb feat(animations): noop animation module and zone fixes () 2017-02-23 08:51:00 -08:00
Tobias Bosch
ab3527c99b refactor(core): view engine - misc
- fix bug when detaching view from `ApplicationRef`
- fix integration of adding `ng-reflect` attributes
  in debug mode.
2017-02-23 08:26:47 -08:00
Tobias Bosch
5049a50bf6 fix(core): host bindings and host listeners for animations
Host bindings / listeners for animation properties should use
the renderer of the component view.
2017-02-23 08:26:47 -08:00
Igor Minar
6b7937f112 test: fix flaky e2e inbox-app test due to net::ERR_SSL_PROTOCOL_ERROR from fetching google fonts ()
example broken build: https://travis-ci.org/angular/angular/jobs/204456086#L2355
2017-02-22 22:00:01 -08:00
Chuck Jazdzewski
801b09066b fix(compiler-cli): import shallow import to @angular/upgrade/static correctly ()
Fixes 
2017-02-22 17:23:08 -08:00
vikerman
a1d4769199 feat: add a PLATFORM_ID token that provides a platform id Object. () 2017-02-22 16:49:46 -08:00
Alex Rickabaugh
88bc143431 fix: app ids for better <style> management for ssr ()
Currently styles are rendered to the root component element, which ensures they're cleaned up automatically
when the client application is bootstrapped. This is less than ideal as progressive rendering can cause HTML
to be rendered before the CSS is loaded, causing flicker.

This change returns to rendering <style> elements in the <head>, and introduces a mechanism for removing
them on client bootstrap. This relies on associating the server and client bootstrap. Another way to think
of this is that the client, when bootstrapping an app, needs to know whether to expect a server rendered
application exists on the page, and to identify the <style> elements that are part of that app in order
to remove them.

This is accomplished by providing a string TRANSITION_ID on both server and client. For most applications,
this will be achieved by writing a client app module that imports BrowserModule.withServerTransition({appId: <id>}).
The server app module will import this client app module and therefore inherit the provider for
TRANSITION_ID. renderModule[Factory] on the server will validate that a TRANSITION_ID has been provided.
2017-02-22 16:06:21 -08:00
Matias Niemelä
830393d234 refactor(animations): support browser animation rendering () 2017-02-22 15:14:49 -08:00
Chuck Jazdzewski
c9bfc59a21 fix(tsc-wrapped): use agreed on options names () 2017-02-22 10:57:01 -08:00
Chuck Jazdzewski
fcc1d17ccb fix(compiler-cli): avoid generating unnecessary factories 2017-02-21 20:48:55 -08:00
Jason Aden
de795ea233 perf: distrubute smaller bundled code and include es2015 bundle
TypeScript compiler will now build to ES2015 code and modules. Babili is used to minify ES2015
code, providing an initial optimization that we couldn't previously get just from Uglify. Uses
Babel to convert ES2015 to UMD/ES5 code, and Uglify to minimize the output.
2017-02-21 20:48:55 -08:00
Miško Hevery
738d93caf7 refactor: rewrite private export using the ɵ prefix 2017-02-21 20:48:55 -08:00
Tobias Bosch
bb0460b93b refactor(core): don’t use switch fall through but rather multiple ifs
V8 does this internally any ways. This way, we can also keep the existing
dirty checking order, which some apps sadly rely on.
2017-02-21 09:12:21 -08:00
Tobias Bosch
90226f7714 refactor(core): conditionally disable tests for the view engine. 2017-02-21 09:12:21 -08:00
Tobias Bosch
7db93310f1 fix: view engine - fix some corner cases 2017-02-21 09:12:21 -08:00
Tobias Bosch
32012a1ffb refactor(core): view engine - move handleEvent function from view to element
Some versions of TypeScript are super slow to compile functions that
contain a lot of `if` conditions in them. Splitting the handle event
expressions per element is similar to what we did in the old codegen.
2017-02-21 09:12:21 -08:00
Tobias Bosch
58ba4f0409 fix(compiler): make view engine work with Aot 2017-02-21 09:12:21 -08:00
Victor Berchet
2ddd1c3ed2 Revert "fix(http): Make ResponseOptionsArgs an interface ()"
This reverts commit fbe4b76f2d34e062a67be307053d56e24f8d6240.
2017-02-20 19:48:53 -08:00
Victor Berchet
c2d5f203a5 Revert "feat(router): add an option to rerun guards and resolvers when query changes"
This reverts commit c2e0f71a78368482be4b86a60c773cc9385ad190.
2017-02-20 19:48:43 -08:00
Victor Berchet
670f2eca00 Revert "fix(router): do not finish bootstrap until all the routes are resolved ()"
This reverts commit 2a191cae2dff9b2616d4e7a4d47ae2ffb2cdf15d.
2017-02-20 19:48:23 -08:00
Victor Berchet
2a191cae2d fix(router): do not finish bootstrap until all the routes are resolved ()
Fixes 
closes 
2017-02-20 18:37:38 -08:00
vsavkin
c2e0f71a78 feat(router): add an option to rerun guards and resolvers when query changes
Closes 
Closes 
2017-02-20 18:01:51 -08:00
Victor Berchet
fbe4b76f2d fix(http): Make ResponseOptionsArgs an interface ()
closes 
2017-02-20 17:55:03 -08:00
Dzmitry Shylovich
874243279d feat(forms): add option to use browser's native validation and angular forms ()
Also renames NgNovalidate -> NgNoValidate

Closes 
2017-02-20 16:36:48 -08:00
Dzmitry Shylovich
551fe50ebd feat(forms): introduce AsyncValidator interface ()
Closes 
2017-02-20 16:26:51 -08:00
Victor Berchet
d6a58f9f70 feat(core): make new Inject() optional for deps specified as InjectionToken ()
fixes 
2017-02-20 16:20:45 -08:00
Victor Berchet
5f3c8441e4 refactor(router): misc
closes 
2017-02-20 16:19:20 -08:00
Victor Berchet
78e8814103 feat(router): add RouteConfigLoadStart and RouteConfigLoadEnd events 2017-02-20 16:19:05 -08:00
Dzmitry Shylovich
7df6f46c1c feat(router): introduce RouteConfigLoaded event
Closes 
2017-02-20 16:19:05 -08:00
Victor Berchet
601fd3e305 fix(platform-webworker): integrate review feedback
closes 
2017-02-20 16:17:58 -08:00
Victor Berchet
cdf99cf68b refactor(platform-webworker): cleanup 2017-02-20 16:17:43 -08:00
Victor Berchet
3517f28609 feat(platform-webworker): renderer v2 integration 2017-02-20 16:17:43 -08:00
Victor Berchet
f38dbfbd64 refactor(platform-webworker): misc cleanup 2017-02-20 16:17:43 -08:00
Igor Minar
1bdf7061b8 release: cut v4.0.0-beta.8 2017-02-18 15:00:33 -08:00
Ward Bell
5129e8e47c docs(router): fix typo in canLoad interface doc comment () 2017-02-18 14:28:45 -08:00
Tobias Bosch
ab26b6518d fix(platform-browser): allow to mix shadow dom with non shadow dom
Allow to style components that don’t use shadow dom inside of components that do.

This reverts 53cf2ec5731af3e6fe700d8db48b15b1e5aa17e3
and adds a test for this case.

Related to 
2017-02-17 17:18:55 -08:00
Tobias Bosch
778ded9fcf refactor: rename ComponentRenderTypeV2 to RendererTypeV2 2017-02-17 17:18:55 -08:00
Tobias Bosch
b9f17a9cb2 fix: make all tests green with new view engine and JIT
Note that this does not yet include enabling the view engine
by default.

Included refactoring:
- view engine: split namespace of elements / attributes already
  when creating the `NodeDef`
- view engine: when injecting the old `Renderer`, use an implementation
  that is based on `RendererV2`
- view engine: store view queries in the component view, not
  on the host element
2017-02-17 17:18:55 -08:00