31 Commits

Author SHA1 Message Date
Alex Rickabaugh
9559d3e949 feat(platform-server): support @angular/http from @angular/platform-server
This change installs HttpModule with ServerModule, and overrides bindings to
service Http requests made from the server with the 'xhr2' NPM package.

Outgoing requests are wrapped in a Zone macro-task, so they will be tracked
within the Angular zone and cause the isStable API to show 'false' until they
return. This is essential for Universal support of server-side HTTP.
2017-02-15 09:14:59 -08:00
Matias Niemelä
96073e51c3 refactor(animations): introduce @angular/animation module ()
PR Close: 
2017-02-10 14:10:03 -06:00
Alex Eagle
ef32e6b0d0 fix: build and test fixes for TS 2.1 () 2017-02-08 11:32:40 -06:00
Chuck Jazdzewski
86b2b2504f feat(common): rename underlying NgFor class and add a type parameter ()
Note, this affects the underlying class and should not affect usage.

DEPRECATION:
- the `NgFor` class is now deprecated. Use `NgForOf<T>` instead.
  IMPORTANT: Only the `NgFor` class is deprecated, not the `ngFor`
  directive. The `*ngFor` and related directives are unaffected by
  this change  as references to the `NgFor` class generated from
  templates will be automatically converted to references to
  `NgForOf<T>` without requiring any template modifications.
- `TrackByFn` is now deprecated. Use `TrackByFunction<T>` instead.

Migration:
- Replace direct references to the `NgFor` class to `NgForOf<any>`.
- Replace references to `TrackByFn` to `TrackByFunction<any>`.

BREAKING CHANGE:
A definition of `Iterable<T>` is now required to correctly compile
Angular applications. Support for `Iterable<T>` is not required at
runtime but a type definition `Iterable<T>` must be available.

`NgFor`, and now `NgForOf<T>`, already supports `Iterable<T>` at
runtime. With this change the type definition is updated to reflect
this support.

Migration:
- add "es2015.iterable.ts" to your tsconfig.json "libs" fields.

Part of 

PR Close 
2017-02-01 09:29:51 -06:00
Chuck Jazdzewski
49fb8143e8 fix(language-service): do not crash when Angular cannot be located ()
Fixes 

PR Close 
2017-01-31 15:45:52 -06:00
Igor Minar
da41a954b5 docs: branding fixes ()
Angular 1.x -> AngularJS
Angular 1 -> AngularJS
Angular1 -> AngularJS
Angular 2+ -> Angular
Angular 2.0 -> Angular
Angular2 -> Angular

I have deliberately not touched any of the symbol names as that would cause big merge collisions with Tobias's work.

All the renames are in .md, .json, and inline comments and jsdocs.

PR Close 
2017-01-27 15:03:11 -06:00
Ryan Cavanaugh
99aa49ab6c feat(language-service): support TS2.2 plugin model 2017-01-09 15:00:40 -05:00
Chuck Jazdzewski
8063b0d9a2 fix(language-service): support TypeScript 2.1 ()
@angular/language-service now supports using TypeScript 2.1 as the
the TypeScript host. TypeScript 2.1 is now also partially supported
in `ngc` but is not recommended as Tsickle does not yet support 2.1.
2017-01-05 11:34:42 -08:00
Victor Berchet
1bd04e95de refactor: remove unused imports 2017-01-05 11:18:34 -08:00
Victor Berchet
eed83443b8 chore(tslint): update tslint to 4.x () 2016-12-27 14:55:58 -08:00
Tobias Bosch
9c697030e6 feat(compiler): generate proper reexports in .ngfactory.ts files to not need transitive deps for compiling .ngfactory.ts files. ()
Note: This checks the constructors of `@Injectable` classes more strictly.
E.g this will fail now as the constructor argument has no `@Inject` nor is
the type of the argument a DI token.

```
@Injectable()
class MyService {
  constructor(dep: string) {}
}
```

Last part of 
Closes 
2016-12-27 09:36:47 -08:00
Tobias Bosch
33910ddfc9 refactor(compiler): store metadata of top level symbols also in summaries ()
This allows a build using summaries to not need .metadata.json files at all
any more.

Part of 
2016-12-15 09:12:40 -08:00
Chuck Jazdzewski
2b90cd532f fix(compiler): narrow the span reported for invalid pipes
fixes 
closes 
2016-12-13 11:23:47 -08:00
Chuck Jazdzewski
3a64ad895a fix(language-service): correctly type undefined
fixes 
closes 
2016-12-13 11:23:08 -08:00
Chuck Jazdzewski
9ec0a4e105 feat(language-service): warn when a method isn't called in an event ()
Closes 13435
2016-12-13 11:20:45 -08:00
Chuck Jazdzewski
6f330a5fc9 fix(language-service): treat string unions as strings ()
Fixes 
2016-12-12 16:42:20 -08:00
Victor Berchet
c8baf51f4f style: clang-format the code 2016-12-09 11:19:55 -08:00
Misko Hevery
b4db73d0bf feat: ngIf now supports else; saves condition to local var
NgIf syntax has been extended to support else clause to display template
when the condition is false. In addition the condition value can now
be stored in local variable, for later reuse. This is especially useful
when used with the `async` pipe.

Example:

```
<div *ngIf="userObservable | async; else loading; let user">
  Hello {{user.last}}, {{user.first}}!
</div>
<template #loading>Waiting...</template>
```

closes 
closes 
2016-12-09 11:19:08 -08:00
Chuck Jazdzewski
4a09c81724 fix(language-service): do not throw for invalid metadata ()
Fixes 
2016-12-06 17:11:09 -08:00
Miško Hevery
16efb13dd1 fix: display framework version on bootstrapped component () 2016-12-06 16:21:07 -08:00
Chuck Jazdzewski
25c2141991 fix(language-service): remove incompletely used parameter from createLanguageServiceFromTypescript() ()
Fixes 
2016-12-06 16:19:39 -08:00
Chuck Jazdzewski
93556a5720 fix(language-service): avoid throwing for invalid class declarations ()
Fixes 
2016-12-06 09:56:30 -08:00
Chuck Jazdzewski
6cf7a1bf84 refactor(build): fix build location of compiler-cli esm module () 2016-12-02 15:19:52 -08:00
Chuck Jazdzewski
3ff6554cbc fix(language-service): update to use CompilerHost from compiler-cli () 2016-12-02 14:34:16 -08:00
Tobias Bosch
614a35d539 feat(compiler): read and write .ngsummary.json files
When compiling libraries, this feature extracts the minimal information
from the directives/pipes/modules of the library into `.ngsummary.json` files,
so that applications that use this library only need to be recompiled
if one of the summary files change, but not on every change
of the libraries (e.g. one of the templates).

Only works if individual codegen for libraries is enabled,
see the `generateCodeForLibraries: false` option.

Closes 
2016-12-01 14:49:52 -08:00
Chuck Jazdzewski
2975d8933c fix(language-service): harden against partial normalization of directives 2016-11-30 14:55:56 -08:00
Victor Savkin
e628b66cca feat(build): record angular version in the dom () 2016-11-30 13:52:08 -08:00
Tobias Bosch
2f7492c986 refactor(compiler): remove unneeded fields from metadata
Removes `CompileIdentifierMetadata.name` / `.moduleUrl`,
as well as `CompileTypeMetadata.name / moduleUrl` and
`CompileFactoryMetadata.name / moduleUrl`.
2016-11-28 15:19:23 -08:00
vsavkin
7194fc2b9e fix(language-service): make link check pass 2016-11-23 16:21:06 -08:00
Tobias Bosch
6c2d931744 chore: make test.sh work again
Previously, `test.sh` relied on calling `build.sh` first
2016-11-23 14:23:05 -08:00
Chuck Jazdzewski
519a324454 feat(language-service): add services to support editors () 2016-11-22 09:10:23 -08:00