38 Commits

Author SHA1 Message Date
Tobias Bosch
20a4f9923f refactor(compiler): remove view.parentInjector 2016-11-02 17:06:27 -07:00
Tobias Bosch
e7c00be19d refactor(compiler): rename AppElement into ViewContainer 2016-11-02 17:06:27 -07:00
Tobias Bosch
74ede9aa9b refactor(core): don’t store view factory in TemplateRef
Instead, generate `createEmbeddedView`.
2016-11-02 17:06:27 -07:00
Tobias Bosch
d1035da85c refactor(compiler): don’t use AppElements for creating component views 2016-11-02 17:06:27 -07:00
Tobias Bosch
13533d2a30 refactor(compiler): remove AppElement.initComponent 2016-11-02 17:06:27 -07:00
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
e391cacdf9 fix(compiler): don’t double bind functions
This fixes a performance regressions introduced by 178fb79b5cafe36c993bb1f9f9a63e8bac162c66.

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
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
Matias Niemelä
33c8948fd3 refactor(animations): ensure animation data-structures are created only when used
Closes #12250
2016-10-14 15:43:41 -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
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
Tobias Bosch
aa9b617c9d fix(compiler): correctly type event handler proxy functions 2016-09-06 11:44:56 -07:00
Matias Niemelä
c9e5b599e4 fix(animations): ensure parent animations are triggered before children (#11201) 2016-09-01 13:24:26 -07:00
Misko Hevery
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
Matias Niemelä
4f8f8cfc66 feat(animations): make sure animation callback reports the totalTime (#11022)
Closes #11022
2016-08-24 16:55:00 -07:00
Matias Niemelä
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
Jason Choi
99989f5d3f chore(facade): remove most facade/async functions 2016-08-05 12:26:28 -07:00
Matias Niemelä
e18626b7a2 fix(core): ensure ngFor only inserts/moves/removes elements when necessary (#10287)
Closes #9960
Closes #7239
Closes #9672
Closes #9454
Closes #10287
2016-08-01 11:09:52 -07:00
Victor Berchet
42b0c1d8a2 refactor: misc cleanup (#10046) 2016-07-13 11:01:32 -07:00
Matias Niemelä
c3bdd504d0 fix(animations): ensure all child elements are rendered before running animations
Closes #9402
Closes #9775
Closes #9887
2016-07-08 18:18:46 -07:00
Matias Niemelä
f1fc1dc669 revert: fix(animations): ensure all child elements are rendered before running animations
This reverts commit cbe85a089306b102c8259e793d689af8e381773e.
2016-07-07 14:12:17 -07:00
Matias Niemelä
cbe85a0893 fix(animations): ensure all child elements are rendered before running animations
Closes #9402
Closes #9775
2016-07-07 14:10:04 -07:00
Tobias Bosch
3f55aa609f feat(browser): use AppModules for bootstrap in the browser
This introduces the `BrowserModule` to be used for long form
bootstrap and offline compile bootstrap:

```
@AppModule({
  modules: [BrowserModule],
  precompile: [MainComponent],
  providers: […], // additional providers
  directives: […], // additional platform directives
  pipes: […] // additional platform pipes
})
class MyModule {
  constructor(appRef: ApplicationRef) {
    appRef.bootstrap(MainComponent);
  }
}

// offline compile
import {bootstrapModuleFactory} from ‘@angular/platform-browser’;
bootstrapModuleFactory(MyModuleNgFactory);

// runtime compile long form
import {bootstrapModule} from ‘@angular/platform-browser-dynamic’;
bootstrapModule(MyModule);
```

The short form, `bootstrap(...)`, can now creates a module on the fly,
given `directives`, `pipes, `providers`, `precompile` and `modules`
properties.

Related changes:
- make `SanitizationService`, `SecurityContext` public in `@angular/core` so that the offline compiler can resolve the token
- move `AnimationDriver` to `platform-browser` and make it
  public so that the offline compiler can resolve the token

BREAKING CHANGES:
- short form bootstrap does no longer allow
  to inject compiler internals (i.e. everything 
  from `@angular/compiler). Inject `Compiler` instead.
  To provide custom providers for the compiler,
  create a custom compiler via `browserCompiler({providers: [...]})`
  and pass that into the `bootstrap` method.
2016-07-02 20:35:09 -07:00
vsavkin
e12b1277df feat(core): split ChangeDetectorStrategy into ChangeDetectionStrategy and ChangeDetectorStatus 2016-06-27 20:19:20 -07:00
ScottSWu
ae75e3640a chore(lint): Added license headers to most TypeScript files
Relates to #9380
2016-06-23 09:47:54 -07:00
Tobias Bosch
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
Alex Eagle
f39c9c9e75 style(lint): re-format modules/@angular 2016-06-09 17:00:15 -07:00
ScottSWu
86fbd50c3d refactor(TypeScript): Add noImplicitAny
We automatically insert explicit 'any's where needed. These need to be
addressed as in #9100.

Fixes #4924
2016-06-08 16:20:50 -07:00
laco0416
602836800b feat(ChangeDetectorRef): make detectChanges() correct
Closes #8599
2016-06-01 12:50:47 -07:00
Matias Niemelä
5e0f8cf3f0 feat(core): introduce support for animations
Closes #8734
2016-05-25 13:56:50 -07:00
Tobias Bosch
e2b1e1577d fix(core): don’t detach nested view containers when destroying a view
When a view is destroyed, we destroy all
views in view containers and should not detach them. However, previously, we also detached them which lead to problems during the iteration loop.

Closes #8458
Closes #8471

Introduced by 0c600cf6e31b7f69f5a36f7dea959e4884217a4d
2016-05-04 16:27:20 -07:00
Igor Minar
a66cdb469f repackaging: all the repackaging changes squashed 2016-05-01 20:51:00 -07:00
Igor Minar
505da6c0a8 repackaging: all the file moves 2016-05-01 20:51:00 -07:00