Commit Graph

2257 Commits

Author SHA1 Message Date
Victor Berchet 0a88e7b736 feat(change detection): export SimpleChange
Closes #4337
2015-09-25 02:33:41 +00:00
Alex Rickabaugh 711ab6d573 docs(forms): Add documentation and live examples for NgForm, NgFormControl, NgFormModel, and NgModel.
Closes #4343
2015-09-24 22:22:03 +00:00
Brian Ford 4e5c663b02 docs(di): fix incorrectly fomatted code blocks 2015-09-24 14:34:04 -07:00
vsavkin 4efc4a5520 feat(query): remove the 3-query-per-element limit
Closes #4336
2015-09-24 21:09:02 +00:00
vsavkin ce6b364dc5 docs(core): add docs to Property and Event 2015-09-24 13:46:29 -07:00
vsavkin 225eab8f25 cleanup(change_detection): make Locals private
Closes #4321
2015-09-24 18:10:47 +00:00
vsavkin 7c2c1a8e03 docs(change_detection): add docs to ChangeDetectorRef 2015-09-24 18:10:47 +00:00
vsavkin 9d2d674ef8 docs(change_detection): add docs to change detection exceptions 2015-09-24 18:10:47 +00:00
Tobias Bosch 7470ad1bd1 refactor(compiler): various cleanups
- use `$implicit` variable value correctly
- handle `ng-non-bindable` correctly
- add some more assertions to `TemplateCompiler`
- make `CompiledTemplate` const
- fix default value for `@Directive.moduleId`
- add new compiler to application bindings

BREAKING CHANGE:
- `Compiler.compileInHost` and all methods of `DynamicComponentLoader` don’t take `Binding` any more, only `Type`s. This is in preparation for the new compiler which does not support this.

Part of #3605

Closes #4346
2015-09-24 10:56:29 -07:00
Marc Laval bffa2cb59b feat(animate): cross-browser compatibility
Closes #4243
2015-09-24 10:24:40 +02:00
Marc Laval 4f56a01b3b fix(shims): add requestAnimationFrame shim for IE9 and Android
Fixes #4209
2015-09-24 10:23:58 +02:00
Marc Laval 29f75c3c63 chore(saucelabs): MdButton tests time out
Closes #4248
2015-09-24 10:22:50 +02:00
Igor Minar ea15d6646b docs(examples): add empty examples directory for api docs examples
This is a place for api docs examples hand written in an idiomatic way.

Closes #4341
2015-09-23 21:30:17 +00:00
Misko Hevery 8427863bab feat(upgrade): Allow including ng2/1 components in ng1/2
Closes #3539
2015-09-23 05:02:43 +00:00
Misko Hevery db6d289d82 chore(upgrade): infrastructure to allow running upgrade module specs 2015-09-23 05:02:43 +00:00
Brian Ford ec68074e69 docs(router): improve docs for Instruction and related classes
Closes #4303
2015-09-22 21:27:47 -07:00
Jeff Cross 3d6e3c2551 fix(http): change http interfaces to types
Types were previously not handled correctly by the type definition
generation process, so a couple of things in http had to be changed 
to interfaces. This issue has been fixed, so now they're types again.

Closes #4024
2015-09-23 01:06:23 +00:00
Brian Ford 0366f317af docs(router): improve docs for Location and related classes
Closes #4299
2015-09-23 00:47:15 +00:00
Brian Ford 8a2370750a docs(router): improve documentation for router bindings 2015-09-23 00:47:15 +00:00
Brian Ford c01f327194 docs(router): improve docs for lifecycle hooks
Closes #4300
2015-09-23 00:47:15 +00:00
Brian Ford 5c0a9eff62 docs(router): improve docs for RouteDefinition classes 2015-09-23 00:47:15 +00:00
Jeff Cross 9c4ab2b2b8 docs(http): fix missing variable from BaseRequestOptions example 2015-09-22 17:21:05 -07:00
Jeff Cross 5ea9c1e7fd docs(http): add docs and examples for BaseResponseOptions
Closes #4324
2015-09-23 00:16:53 +00:00
Jeff Cross 662a585fc2 docs(http): add docs and examples for ResponseOptions 2015-09-23 00:16:53 +00:00
Jeff Cross ae3713ef95 docs(http): add docs and examples for BaseRequestOptions 2015-09-23 00:16:53 +00:00
Jeff Cross 707e6f7671 docs(http): improve docs and add example for RequestOptions 2015-09-23 00:16:53 +00:00
Brian Ford a554f1c45d chore(router): do not export Url class
Closes #4304
2015-09-22 23:51:19 +00:00
Brian Ford 41b019f5f8 refactor(router): do not export RootRouter
BREAKING CHANGE:

It's unlikely that any apps were explicitly referencing `RootRouter`, but if they were they should
prefer to use the `routerBindings` helper or the `ROUTER_BINDINGS` const exported from `angular2/router`
2015-09-22 23:51:19 +00:00
Misko Hevery af2cd4d6f3 fix(api): align dart/js APIs 2015-09-22 23:11:40 +00:00
Alex Eagle 577ee3744a fix(bug): reflect Dart interfaces from superclass as well
fixes #4221

Closes #4222
2015-09-22 22:31:07 +00:00
vsavkin fd3eae9623 docs(di): add missing docs
Closes #4302
2015-09-22 21:38:33 +00:00
vsavkin 238dfc1e17 cleanup(di): make KeyRegistry private 2015-09-22 21:38:33 +00:00
vsavkin 29b56ceb40 cleanup(di): make DependencyProvider private 2015-09-22 21:38:33 +00:00
Tobias Bosch cc0c30484f refactor(compiler): cleanup and preparation for integration
- Rename `DirectiveMetadata` into `CompileDirectiveMetadata`, merge
  with `NormalizedDirectiveMetadata` and remove `ChangeDetectionMetadata`
- Store change detector factories not as array but
  directly at the `CompiledTemplate` or the embedded template
  to make instantiation easier later on
- Already analyze variable values and map them
  to `Directive.exportAs`
- Keep the directive sort order as specified in the
  `@View()` annotation
- Allow to clear the runtime cache in `StyleCompiler`
  and `TemplateCompiler`
- Ignore `script` elements to match the semantics of the
  current compiler
- Make all components dynamically loadable and remove
  the previously introduced property `@Component#dynamicLoadable`
  for now until we find a better option to configure this
- Don’t allow to specify bindings in `@View#directives` and `@View#pipes` as this was never supported by the transformer (see below for the breaking change)

BREAKING CHANGE:
- don't support DI bindings in `@View#directives` and `@View@pipes` any more in preparation of integrating the new compiler. Use `@Directive#bindings` to reexport directives under a different token instead.

Part of #3605
Closes #4314
2015-09-22 12:50:03 -07:00
mgechev f600d88209 docs: fix typo
Closes #4306
2015-09-22 13:32:43 +00:00
mgechev 662ff47627 docs: fix typos
Closes #4308
2015-09-22 12:15:49 +00:00
Jeff Cross da6def3772 docs(http): add documentation for Request
Closes #4238
2015-09-21 22:20:58 +00:00
Jeff Cross c868f40bef docs(http): improve docs for Headers 2015-09-21 22:20:58 +00:00
Jeff Cross 17af481134 docs(http): add docs and examples for JSONP_BINDINGS 2015-09-21 22:20:58 +00:00
Jeff Cross b2695e46e1 docs(http): add docs and examples for HTTP_BINDINGS 2015-09-21 22:20:58 +00:00
vsavkin b0effe8e27 docs(di): add docs to Injector
Closes #4254
2015-09-21 21:55:04 +00:00
vsavkin 794e3870c5 docs(di): make TypeLiteral private
Closes #4290
2015-09-21 20:44:49 +00:00
vsavkin 95c8eef97a docs(di): add docs to OpaqueToken 2015-09-21 20:44:49 +00:00
vsavkin b8c4d3e7fb docs(di): add docs to Key 2015-09-21 20:44:49 +00:00
Brian Ford aed34e1f82 feat(angular_1_router): add ngRouteShim module
This module attempts to provide a shim for `$routeProvider` to aid in
migrating from ngRoute to Component Router.

Closes #4266
2015-09-21 12:13:07 -07:00
Brian Ford 5205a9e65f refactor(angular_1_router): use directives for route targets
BREAKING CHANGE:

Previously, route configuration took a controller constructor function as the value of
`component` in a route definition:

```
$route.config([
  { route: '/', component: MyController }
])
```

Based on the name of the controller, we used to use a componentMapper service to
determine what template to pair with each controller, how to bind the instance to
the $scope.

To make the 1.x router more semantically alligned with Angular 2, we now route to a directive.
Thus a route configuration takes a normalized directive name:

```
$route.config([
  { route: '/', component: 'myDirective' }
])
```

BREAKING CHANGE:

In order to avoid name collisions, lifecycle hooks are now prefixed with `$`. Before:

```
MyController.prototype.onActivate = ...
```

After:

```
MyController.prototype.$onActivate = ...
```

Same for `$canActivate` (which now lives on the directive factory function),
`$canDeactivate`, `$canReuse`, and `$onDeactivate` hooks.
2015-09-21 12:13:07 -07:00
Brian Ford 6e0ca7f39a fix(router): use StringWrapper.startsWith 2015-09-21 12:13:07 -07:00
Brian Ford 43f97a951c refactor(router): move assertComponentExists into facade
This is to make way for a refactor to the ng 1.x router directives,
which will use strings rather than controller functions in route configs.
2015-09-21 11:17:19 -07:00
Brian Ford a443ea64a1 refactor(router): remove unused dependencies in ngOutlet 2015-09-21 11:17:19 -07:00
vsavkin c2a60f1624 feat(core): add support for @ContentChild and @ViewChild
Closes #4251
2015-09-20 01:45:09 +00:00
vsavkin 2e9de0b169 feat(core): add sugar to use ContentChildren and ViewChildren as prop decorators
Closes #4237
2015-09-20 00:43:04 +00:00
vsavkin 5dbe292615 feat(core): add support for ContentChildren and ViewChildren 2015-09-20 00:43:04 +00:00
Rado Kirov 5809a02624 docs(query): edit and extend query and view query docs. 2015-09-18 18:27:42 -07:00
Brian Yarger 3525d8a394 fix(http): throw if url is not string or Request
Closes #4245

Closes #4257
2015-09-18 23:33:17 +00:00
Alfonso Presa 283415beab fix(sfx): Include ngHttp in SFX bundle
fixes: #3934

Closes #3933
2015-09-18 09:07:31 -07:00
Marc Laval 390aacd442 fix(facade): workaround for lack of Symbol.iterator in es6-shim
Closes #4219
Fixes #4216
2015-09-18 09:46:13 +02:00
Pascal Precht 5a3ce87915 chore(http): remove unused properties from Request
This removes properties mentioned in #3339

Closes #3339
Closes #3823
2015-09-17 17:16:47 -07:00
Alex Rickabaugh b9ea394c85 docs(core): Add plnkr example for *ng-if. 2015-09-17 15:28:11 -07:00
Alex Rickabaugh 06f8330cfa fix(core): Document the new bootstrap APIs. Also rename rootBindings() to platformBindings() to be more clear about what it is.
Closes #4218
2015-09-17 20:58:38 +00:00
Tobias Bosch f490565b09 refactor(compiler): cleanup method and property names
Closes #4236
2015-09-17 20:41:37 +00:00
vsavkin d05df30a94 docs(di): add docs to forwardRef 2015-09-17 13:13:40 -07:00
vsavkin e1c0b1abcb docs(di): add docs to DI exceptions 2015-09-17 13:13:30 -07:00
vsavkin b2e9da4905 docs(di): add docs for Binding 2015-09-17 13:12:50 -07:00
Victor Mejia 9179afb2a1 docs(compiler/element_injector): fix typo
Closes #4210
2015-09-17 13:35:21 +00:00
Craig Doremus adb3813e85 docs(shared/service_message_broker): fix typo
Typo fix on line 32 suggested by PatrickJS
Closes #4226
2015-09-17 12:59:48 +00:00
Naomi Black 563fffd9b0 docs(chore): fix bad links in the API docs 2015-09-16 23:28:16 -07:00
Tobias Bosch 457b689bf0 feat(compiler): add TemplateCompiler
TemplateCompiler is the entry point to the new compiler

Related to #3605
Closes #4220
2015-09-17 04:24:15 +00:00
vsavkin eaa20f661a fix(exceptions): NoAnnotationError message is not displayed
Closes #4215

Closes #4223
2015-09-17 00:58:55 +00:00
Yegor Jbanov 241632aaa1 feat(code size): make assertionsEnabled() statically computable by dart2js
Our existing implementation prevented dart2js from statically deducing the
return value. This fix does not yet result in better tree-shaking due to the
following dart2js bugs:

https://github.com/dart-lang/sdk/issues/24354
https://github.com/dart-lang/sdk/issues/24355

Closes #4198
2015-09-16 19:01:48 +00:00
Jeff Cross 06f0d6c046 docs(pipe_transform): make example headers consistent 2015-09-16 11:44:37 -07:00
Jeff Cross d276370ba1 docs(core): add docs for PipeOnDestroy interface 2015-09-16 11:44:36 -07:00
Jeff Cross d9776b4112 docs(core): add docs for PipeTransform interface 2015-09-16 11:44:36 -07:00
Igor Minar 53412a71e5 docs(NgZone): add public api docs 2015-09-16 11:42:30 -07:00
Harry Terkelsen 70586b668c fix(debug): make debug tools take ComponentRef
The debug tools used to take ApplicationRefs, which are the old return
type of bootstrap. Now bootstrap returns ComponentRef, so the debug
tools should be updated.

Closes #4203
2015-09-16 18:00:28 +00:00
Igor Minar 8f985dd558 docs(pipe_transform): remove extra backticks 2015-09-16 10:01:37 -07:00
J. Andrew Brassington 045cb90a46 docs(core/facade/collection): Correct typo
Add correct spelling of the word "statically"
Closes #4193
2015-09-16 12:14:24 +00:00
Victor Berchet d6cda15879 refactor(form): misc minor refactoring
Closes #3951
2015-09-16 10:34:26 +00:00
Pawel Kozlowski 73351ac00f fix(NgClass): ignore empty and blank class names
Fixes #4033

Closes #4173
2015-09-16 07:56:48 +00:00
Yegor Jbanov 5bab607f44 chore(examples): remove dynamic versions of example apps
Closes #4200
2015-09-16 00:23:49 +00:00
vsavkin 16bf335a4a refactor(async): replace RxJS with RxNext
Closes #3110
Closes #4201
2015-09-15 23:44:57 +00:00
Jeff Cross 7b3161a229 fix(pipes): add triple ticks around async_pipe code sample
Closes #4110
2015-09-15 15:50:44 -07:00
Pawel Kozlowski 045cc8269f fix(compiler): remove attributes when expression in [attr.foo]='exp' evaluates to null
Fixes #4150

Closes #4163
2015-09-15 19:59:12 +00:00
vsavkin 9f999dd8e4 cleanup(pipes): clean up imports 2015-09-15 11:47:09 -07:00
Lenny d890c4f827 refactor(pipes): remove LimitTo pipe in favor of slice pipe 2015-09-15 11:42:31 -07:00
Lenny c2043ec681 feat(pipes): add slice pipe that supports start and end indexes 2015-09-15 11:42:30 -07:00
Lenny 0808eeaa0c feat(StringWrapper): add support for JS slice method to string 2015-09-15 11:42:30 -07:00
Lenny bced3aaa17 fix(ListWrapper): make list slice in dart return empty list if start and end are inverted like JS 2015-09-15 11:42:30 -07:00
Misko Hevery 105db02e07 fix(api): remove DomRenderer from public API
Closes #4187
2015-09-15 18:12:05 +00:00
Misko Hevery 61b6a475a6 fix(api): remove RecordViewTuple / cleanup NgFor 2015-09-15 18:12:05 +00:00
Misko Hevery 6db9f9013d fix(api): remove UNDEFINED 2015-09-15 18:12:05 +00:00
Misko Hevery f7d46e7159 fix(api): remove animation from public API 2015-09-15 18:12:05 +00:00
Misko Hevery 5b6d576f93 chore: add test to prevent accidental changes to public API 2015-09-15 18:12:05 +00:00
David Fuka 255ed69392 docs(router): Typo
Closes #4152
2015-09-15 18:07:00 +00:00
Pawel Kozlowski 5f15363dab feat(CORE_DIRECTIVES): add NgStyle to CORE_DIRECTIVES
Fixes #4096

Closes #4161
2015-09-15 17:55:13 +00:00
Ted Sander a15b679494 feat(ng_for): Add Even and Odd variables to ng_for
Add even and odd local variables to ng_for to allow developers to style table rows differently and other features.

Closes #4181
2015-09-15 17:45:32 +00:00
Jennifer Bland db098650ee docs: correct typo 2015-09-15 10:19:49 -07:00
Marc Laval f7b6ff0520 chore(build): improve reliability of the saucelabs job
Closes #4091
Closes #4047
2015-09-15 18:34:13 +02:00
Marc Laval df7f59b3a8 fix(test): do not set ng.probe when ng is null or undefined 2015-09-15 18:33:33 +02:00
Marc Laval abc4ef31e2 fix(test): AngularProfiler should check before using modern APIs 2015-09-15 18:33:32 +02:00
Marc Laval 55290b9b21 fix(test): PostMessageBusSink tests failing in slow browsers 2015-09-15 18:33:31 +02:00
Marc Laval d6464633fa fix(test): StyleCompiler tests failing in Android browsers 2015-09-15 18:33:30 +02:00
Marc Laval c83207f231 fix(test): Android browser does not support element.click() 2015-09-15 18:33:29 +02:00
Marc Laval 3a7b50f244 fix(shims): function.name to return empty string when no name 2015-09-15 18:33:28 +02:00
Tim Blasi cb4ff7491a chore(dart/transform): Integrate protoc into gulp build
This change detects if the user has `protoc` available and, if so, uses
it to generate `.pb.dart` files. If not, pre-built files are used
instead.
2015-09-15 08:39:07 -07:00
Brian Ford 5298eb0709 feat(router): enforce convention of CamelCase names in route aliases
Closes #4083
2015-09-14 22:46:02 -07:00
Brian Ford cb4a9a3c04 refactor(router): use CamelCase aliases for routes 2015-09-14 22:46:02 -07:00
Alex Rickabaugh 97d1844bfc feat(core): Add a long-form syntax for Angular bootstrapping.
This change adds a syntax for bootstrapping Angular on a page that allows more fine-grained control of the hierarchy created. platform() creates a platform injector (of which there can only be one). From the platform, .application() creates an Angular application including a Zone and all specified application bindings (e.g. for the DOM, HTTP, Compiler, Renderer, etc). At the application level, .bootstrap() will bootstrap the given component into that application.

Closes #3852
2015-09-14 23:37:39 +00:00
Alex Rickabaugh 193792c27f refactor(router): Switch from using APP_COMPONENT binding to a manual ROUTER_PRIMARY_COMPONENT binding.
With the coming bootstrapping changes, a single application (and thus Router) can have multiple root components. One of these needs to be identified as the "primary" component from which the Router will load its configuration. This is now done by providing a ROUTER_PRIMARY_COMPONENT binding to the primary component type.
2015-09-14 23:37:39 +00:00
Alex Rickabaugh 4f57990d45 feat(core): Support multiple ChangeDetectors in a single LifeCycle.
This allows a single LifeCycle to be shared among multiple root components, since each root component has its own ChangeDetector configured.
2015-09-14 23:37:39 +00:00
Yegor Jbanov 9dc1d6ae81 fix(code size): do not rely on Uri in BrowserDomAdapter
Closes #4182
2015-09-14 22:51:53 +00:00
Igor Minar e4f94f0678 fix(build): lazy-require es6-shim in the a1 router to prevent npm/gulp issues
We should really remove this shim from the angular 1 bundle. I'll create an issue for that.
2015-09-14 15:38:10 -07:00
Jeremy Elbourn bfbce542e6 chore(material): add unit tests for MdButton. 2015-09-14 14:36:57 -07:00
Brian Ford d2458866c1 refactor(router): remove unused Pipeline 2015-09-14 21:21:57 +00:00
Rado Kirov cac25fe003 chore(build): replace traceur-runtime with es6-shim.
This removes traceur as a dependency for the t push -f
angular2 build.

Closes #4148
2015-09-14 21:02:29 +00:00
Brian Ford 309944931f fix(router): recognize child components with empty segments
Previosly, recognition ended when a parent captured all the parsed URL segments.
This caused routes that delegated from a parent to a child with an empty segment
to never be recognized.

Closes #4178
2015-09-14 20:22:40 +00:00
Misko Hevery 63e785902f feat(change_detection): allow triggering CD form ChangeDetectorRef
Closes #4144
2015-09-14 18:07:31 +00:00
Misko Hevery 83715f06d1 chore(docs): typo 2015-09-14 18:07:31 +00:00
Misko Hevery b42b9fc42d refactor(hooks): change to intrefaces 2015-09-14 18:07:31 +00:00
Robert Messerle 39ce9d3397 feat(animate): adds basic support for CSS animations on enter and leave
Closes #3876
2015-09-14 17:37:09 +00:00
Gerd Jungbluth effbb54f3d docs(metadata): fix some minor typos
Closes #4157
2015-09-13 13:36:35 +00:00
Gerd Jungbluth d1dbc973c4 docs(DirectiveMetadata): fix some minor typos 2015-09-13 13:36:35 +00:00
Kevin Huang feddefdc84 docs(DirectiveMetadata): fix typo
Closes #4153
2015-09-12 13:28:29 +00:00
Jason Teplitz 787d1f955f fix(Typings): Remove public exports added in 1926335b85
Closes #4147
2015-09-11 19:16:57 -07:00
Tobias Bosch 0246b2a2cb feat(compiler): support creating template commands
Closes #4142
2015-09-12 01:16:06 +00:00
Tobias Bosch 71cbb49672 refactor(compiler): allow to serialize and deserialize `DirectiveMetadata` 2015-09-12 01:16:06 +00:00
Tobias Bosch 67c79ba3f6 fix(test): make `evalModule` faster by caching spawned modules in the browser 2015-09-12 01:16:06 +00:00
Brian Ford d9036c6cf3 feat(router): introduce new navigate method
Previously, `router.navigate` took a string representing the URL.
Now, it accepts an array that mirrors the link DSL.

Closes #4040

BREAKING CHANGE

The old method has been renamed to `router.navigateByUrl`.
Either change your navigation calls to use the DSL (preferred) or
call `router.navigateByUrl` instead.

Closes #4074
2015-09-11 17:20:13 -07:00
Brian Ford acc2722cb8 refactor(router): rename navigate and navigateInstruction methods 2015-09-11 17:17:45 -07:00
Brian Ford 5e49d7e624 fix(router): load route config from async instructions
Previously, async routes generated from links would not load the configs of
their resolved components, which led to broken links in the children of the
async instruction's component.

This commit fixes the bookkeeping in the Router to correctly load the configs.

Fixes internal b/23791558

Closes #4146
2015-09-11 16:23:40 -07:00
Harry Terkelsen 013811c171 chore(benchmarks): enable the transformer on the static_tree benchmark
Closes #4143
2015-09-11 23:03:29 +00:00
Tamas Csaba e34a29dafe docs(http): fix http documentation
Closes #3931
2015-09-11 15:37:40 -07:00
PatrickJS b91a966d05 docs: RenderProtoViewMergeMapping typo
Closes #4042
2015-09-11 15:37:26 -07:00
Nick Mann 958863d038 docs: correct typo 'specifity' to 'specificity'
Closes #4082
2015-09-11 15:37:21 -07:00
Henry Wong fd14460148 docs: fixed misspelling of the word 'explicitly'
Closes #4108
2015-09-11 15:37:13 -07:00
Trotyl Yu 4df0604f09 docs: cleanup
According to dictionary 'syntax' is countable and according to context it should be plural.

fix the broken table of template summary.

fix the table in Property Binding.

fix a position of right parethesis in Property Binding.

fix a occurance of a non-sense underscore.

fix a table in Inline Templates.

fix a missing '.' in Template Microsyntax.

fix the table in '## Binding Events'.

fix an article usage of 'an' against 'a' in '## Binding Events'.

fix a statement against the usage of plural after 'any'.

fix the typo error in former fixes.

Closes #3994
2015-09-11 15:25:34 -07:00
Henrique Limas a826f22698 docs(di): fix typo "before before"
Closes #3986
2015-09-11 15:25:34 -07:00
Olivier Combe 7ccef08715 docs(core): fixed typo in RenderCompiler comments
Just a small typo fix :)
Closes #4046
2015-09-11 15:25:34 -07:00
Phillip Alexander 716ce08a93 docs(angular2/angular2_sfx): Correct typo
Add correct spelling of the word "arithmetic"

Closes #4066
2015-09-11 15:25:33 -07:00
Will Ngo 646b9200a2 docs(web_workers): fix typo
Closes #4070
2015-09-11 15:25:33 -07:00
Lukas Ruebbelke 6449c3c1c6 docs(CompilePipeline): correct compiliation to compilation
Closes #4072
2015-09-11 15:25:33 -07:00
Artur Meyster 1fba78b12a docs(web_workers/shared/message_bus.ts): correct typo
Closes #4076
2015-09-11 15:25:32 -07:00
William Johnson 80a04b4323 docs(message_bus.ts):Change initilialized to initialized
Closes #4077
2015-09-11 15:25:32 -07:00
Timur Meyster 41c7c57c65 docs(web_workers/worker/renderer.ts): correct typo
Closes #4078
2015-09-11 15:25:32 -07:00
brianpchsu f7fb5097b9 docs(proto_view_merger.ts):Change seprate to separate
Closes #4079
2015-09-11 15:25:32 -07:00
Wenqian Guo 20fbbcc72d docs(web_workers/ui/di_bindings): Correct typo
Closes #4081
2015-09-11 15:25:32 -07:00
Richard Kho f94a2d86fb docs(web_workers/shared/message_bus.ts): correct typo 'messsage' to 'message'
Corrects the typo 'messsage' to 'message' on line 35.
Closes #4085
2015-09-11 15:25:31 -07:00
Ning Xia 55358a39dc docs(core/render/dom/compiler/property_binding_parser.ts): correct typo
"identifier" was misspelled.
Closes #4095
2015-09-11 15:25:31 -07:00
Ansel Rosenberg a2bcf71b6b docs(core/di/binding.ts): Correct typo
Closes #4099
2015-09-11 15:25:31 -07:00
Jimmy Gong 18de0ceeb1 Fixes typo 'partialy' -> 'partially'
Closes #4102
2015-09-11 15:18:29 -07:00
Timur Meyster fc82700364 docs(web_workers/shared/application.ts): correct typo
Closes #4109
2015-09-11 15:18:29 -07:00
dapperAuteur 16ecc7e82d docs(core/pipes/date_pipe.ts): configurable typo
Closes #4121
2015-09-11 15:18:28 -07:00
pocketmax ed586f0b4a docs(forward_ref): typo
Closes #4123
2015-09-11 15:18:27 -07:00
David Fuka f66c3a21eb docs(di/binding): Typo
Closes #4124
2015-09-11 15:18:26 -07:00
gistic-guob 17eb41ff48 docs(core/render): view typo
Closes #4125
2015-09-11 15:18:26 -07:00
Rob Richardson 31e385c70d docs(compiler/element_injector): typo beneficial
Closes #4126
2015-09-11 15:18:25 -07:00
rainabba cc8a6ebf68 docs(codegen_logic_util): typo
Closes #4127
2015-09-11 15:18:24 -07:00
David Fuka 19408968f3 docs(di/binding.ts): Typo on line 73
Closes #4128
2015-09-11 15:18:24 -07:00
Georgios Kalpakas efaed076ab docs(pipes): add missing parenthesis in AsyncPipe example
Closes #4139
2015-09-11 15:18:23 -07:00
Brian Ford 3c13f5fd4b test(router): add integration test for async routes with children 2015-09-11 11:24:36 -07:00
vsavkin f6cc573687 fix(exception_handler): fix error messages of wrapped exceptions
Closes #4117
2015-09-10 22:26:56 +00:00
vsavkin 892d2b9652 refactor(exception_handler): move ExceptionHandler into facade 2015-09-10 22:26:55 +00:00
Rado Kirov 63141ab9ab chore(tools): remove rtts from the repo.
Closes #4107
2015-09-10 21:10:36 +00:00
Jason Teplitz 6a4a8a60ab docs(WebWorker): Fix typos in WebWorker docs 2015-09-10 10:39:28 -07:00
Jeff Cross 4fd9cc26d5 fix(core): export bootstrap from core exports for JS
Closes #4097
2015-09-10 05:05:09 +00:00
Jason Teplitz 1926335b85 fix(Typings): Output public constructors in .d.ts files
Closes #3926.

Closes #3963
2015-09-10 01:37:43 +00:00
Tobias Bosch 12dd44f7f6 feat(compiler): add change detector generation
Runtime and Codegen.

Part of #3605
Closes #4057
2015-09-10 00:59:34 +00:00
Jason Teplitz 2daf2eedb6 docs(WebWorkers): Add overview of WebWorker design
Closes #4103
2015-09-09 23:16:11 +00:00
Jeff Cross 2ab8c59ad5 docs(pipes): improve docs for async pipe
Closes #4104
2015-09-09 22:31:07 +00:00
Michael Goderbauer 0653b82048 fix(benchpress): fix benchpress overreporting in chrome45
closes #4011

Closes #4101
2015-09-09 21:37:48 +00:00
Brian Ford 77e8304fc4 fix(router): do not reuse common children with different parents 2015-09-09 12:03:59 -07:00
Brian Ford 8aec215ca0 fix(router): throw when generating non-terminal link
Closes #3979

Closes #4092
2015-09-09 15:53:30 +00:00
Igor Minar f91c087c46 feat(TestComponentBuilder): add #overrideBindings and #overrideViewBindings
Closes #4052
2015-09-09 14:20:05 +00:00
Igor Minar 39a6f85e95 test(TestComponentBuilder): add tests for overriding child component's directive 2015-09-09 14:20:05 +00:00
Prakal 3dfb7d406b docs(angular1_router/build): Correct typo
Closes #4069
2015-09-09 06:20:55 +00:00
Harry Terkelsen 8810f53435 chore(benchmarks): rename static_tree to static_tree_perf
Closes #4061
2015-09-09 03:58:26 +00:00
Victor Berchet 998c7c2e03 doc: add some API doc
Closes #4060
2015-09-09 02:49:07 +00:00
yjbanov 8dd6c4680b feat(perf): change detection profiler
Closes #4000
2015-09-09 01:12:58 +00:00
Jason Teplitz f3da37c92f fix(WebWorker): Add zone support to MessageBus
Closes #4053
2015-09-08 14:03:58 -07:00
Tim Blasi 3b9c08676a fix(compiler): Implement Token#toString for Operator
Include a case for `TokenType.Operator`.

Closes #4049
2015-09-08 10:30:27 -07:00
vsavkin a8bdb693b9 feat(pipes): add support for pure pipes
By default, pipes are pure. This means that an instance of a pipe will be reused and the pipe will be called only when its arguments change.

BREAKING CHANGE

Before:

@Pipe({name: 'date'}) class DatePipe {} defines an impure pipe.

After:

@Pipe({name: 'date'}) class DatePipe {} defines a pure pipe.
@Pipe({name: 'date', pure: false}) class DatePipe {} defines an impure pipe.

Closes #3966
2015-09-08 16:24:27 +00:00
Matt Greenland 70f6a46f1c fix(forms): Also update viewModel in NgFormControl 2015-09-05 11:58:42 -07:00
Matt Greenland e36966b83c fix(forms): Update NgModel's viewModel when model changes
Closes #3627
2015-09-05 11:58:42 -07:00
Jeff Cross f14b212dc9 refactor: export core APIs from angular2/core
This change moves many APIs to the angular2/core export.

This change also automatically adds FORM_BINDINGS in
the application root injector.

BREAKING CHANGE:
    Many dependencies that were previously exported from specific
    APIs are now exported from angular2/core. Affected exports, which
    should now be included from angular2/core include:

    angular2/forms
    angular2/di
    angular2/directives
    angular2/change_detection
    angular2/bootstrap (except for dart users)
    angular2/render
    angular2/metadata
    angular2/debug
    angular2/pipes
Closes #3977
2015-09-05 07:01:34 +00:00
Jeff Cross 6d13cf9b8f refactor(core): move more modules into core 2015-09-05 07:01:34 +00:00
Jeff Cross 2d4f331c63 chore: update ts2dart version 2015-09-05 07:01:34 +00:00
Victor Berchet 86bda288bd fix(DirectiveResolver): Synced with latest changes
Closes #3928
2015-09-05 01:02:33 +00:00
Victor Berchet 3d38ec8aac refactor(Lifecycle hooks): move the hooks to their own module (lifecycle_hooks)
BREAKING CHANGE

Lifecycle hooks now live in the `angular2/lifecycle_hooks` module.
They previously lived in the `metadata` module.
2015-09-05 01:02:33 +00:00
Victor Berchet 8302afffb4 refactor(LifecycleEvent): remove LifecycleEvent
fixes #3924

BREAKING CHANGE

The `lifecycle` configuration for directive has been dropped.

Before

    // Dart
    @Component({lifecycle: const [LifecycleEvent.OnChanges], ...})
    class MyComponent implements OnChanges {
      void onChanges() {...}
    }

    // Typescript
    @Component({lifecycle: [LifecycleEvent.OnChanges], ...})
    class MyComponent implements OnChanges {
      onChanges(): void {...}
    }

    // ES5
    var MyComponent = ng.
    Component({lifecycle: [LifecycleEvent.OnChanges], ...}).
    Class({
      onChanges: function() {...}
    });

After

    // Dart
    @Component({...})
    class MyComponent implements OnChanges {
      void onChanges() {...}
    }

    // Typescript
    @Component({...})
    class MyComponent implements OnChanges {
      onChanges(): void {...}
    }

    // ES5
    var MyComponent = ng
      .Component({...})
      .Class({
        onChanges: function() {
        }
      });
2015-09-05 01:02:33 +00:00
Michael Goderbauer 67b9414268 fix(benchpress): make benchpress fit for chrome 45
Closes #3411

Closes #3982
2015-09-05 01:01:13 +00:00
Harry Terkelsen d8c5ab232c refactor: add leading underscore to private fields
Closes #4001
2015-09-05 00:54:50 +00:00
Harry Terkelsen c320240086 chore(benchmarks): enable transformer on the benchmarks
Closes #3960
2015-09-05 00:25:51 +00:00
vsavkin 15164a8e6c fix(reflector): merge prop metadata from getters and setters
Closes #4006
2015-09-04 23:44:22 +00:00
Rado Kirov e9ad100b1f fix(build): switch to cjs output for es5.
System output does not work at the current versions of TS and
system.js. Will revisit after upgrading TS.

Removes unused traceur tooling.

Closes #3974
2015-09-04 23:10:34 +00:00
vsavkin df8e15cab7 feat(core): add support for @HostBinding and @HostListener
Example:

@Directive({selector: 'my-directive'})
class MyDirective {
  @HostBinding("attr.my-attr") myAttr: string;
  @HostListener("click", ["$event.target"])
  onClick(target) {
    this.target = target;
  }
}

Closes #3996
2015-09-04 22:18:22 +00:00
vsavkin 855cb16cc7 refactor(event_manager): use multi bindings to configure EventManager
Closes #3978
2015-09-04 21:57:36 +00:00
Rado Kirov 5ebeaf7c9b feat(query): implement query update mechanism based on views.
Instead of working with finer grained element injectors, queries now
iterate through the views as static units of modification of the
application structure. Views already contain element injectors in the
correct depth-first preorder.

This allows us to remove children linked lists on element injectors and a
lot of book keeping that is already present at the view level.

Queries are recalculated using the afterContentChecked and
afterViewChecked hooks, only during init and after a view container has
changed.

BREAKING CHANGE:
ViewQuery no longer supports the descendants flag. It queries the whole
component view by default.

Closes #3973
2015-09-04 21:39:35 +00:00
Alfonso Presa be954115f8 feat(NgFor): $last property support
Makes a new `$last` property available during the loop with a boolean
showing if it's the last item in the iteration.

closes: #3102

Closes #3991
2015-09-04 21:01:42 +00:00
Tobias Bosch 2384082b5c feat(compiler): add stylesheet compiler
Part of #3605
Closes #3891
2015-09-04 19:22:43 +00:00
Tobias Bosch 2a126f72f3 feat(tests): add helper to eval a module
Needed later for unit tests for code gen and runtime code
in #3605
2015-09-04 19:22:43 +00:00
vsavkin 896add7d77 feat(core): add support for @Property and @Event decorators
Example:

@Directive({selector: 'my-selector'})
class MyDirective {
  @Property() prop;
  @Property('el-prop') prop2;
  @Event() event;
  @Event('el-event') event2;
}

Closes #3992
2015-09-04 18:33:31 +00:00
mgechev 337ce21149 docs(util): fix typos
Closes #3988
2015-09-04 15:35:29 +00:00
Igor Minar 34deda594f fix(test_lib): add missing types 2015-09-03 23:52:10 +00:00
Igor Minar 687e7b565f fix(test_lib): reexport fake_async via angular/test
previously fake_async was not being publically exported at all
2015-09-03 23:52:10 +00:00
Igor Minar ddde7117a7 fix(fake_async): remove unused variable 2015-09-03 23:52:10 +00:00
Igor Minar 44c303aad2 refactor(collection.ts): simplify ListWrapper.clear implementation 2015-09-03 23:52:10 +00:00
Igor Minar 53d0861372 style(di): fix a variable name typo 2015-09-03 23:52:09 +00:00
Jason Teplitz 696edde17c fix(WebWorker): Fix Todo Server demo and add test to ensure the demo can bootstrap.
Closes #3970
2015-09-03 18:52:06 +00:00
vsavkin 3ff321475d cleanup(di): fix dart analyzer errors
Closes #3962
2015-09-03 15:18:18 +00:00
vsavkin d43bd9b4ca refactor(forms): update example apps to use the new way of registering validators 2015-09-03 15:18:18 +00:00
vsavkin 79994b2abf refactor(forms): use multibindings instead of query to get a list of validators
BREAKING CHANGE

Before:

@Directive({selector: '[credit-card]', bindings: [new Binding(NgValidator, {toAlias: forwardRef(() => CreditCardValidator)})]})
class CreditCardValidator {
  get validator() { return CreditCardValidator.validate; }
  static validate(c): StringMap<string, boolean> {...}
}

After:

function creditCardValidator(c): StringMap<string, boolean> {...}
@Directive({selector: '[credit-card]', bindings: [new Binding(NG_VALIDATORS, {toValue: creditCardValidator, multi: true})]})
class CreditCardValidator {}
2015-09-03 15:18:18 +00:00
vsavkin 7736964a37 feat(di): add support for multi bindings
BREAKING CHANGE

Previously a content binding of a component was visible to the directives in its view with the host constraint. This is not the case any more. To access that binding, remove the constraint.
2015-09-03 15:18:18 +00:00
Tobias Bosch 2fea0c2602 feat(compiler): allow to create ChangeDetectors from parsed templates
Part of #3605
Closes #3950
2015-09-02 23:20:14 +00:00
Rado Kirov 5c9613e084 test(query): add a test for view query with var bindings
Closes #3920

Closes #3946
2015-09-02 20:26:59 +00:00
Rado Kirov 01cdd31339 fix(query): clean-up queryref during dehydration
The QueryRef objects persists during dehydration but needs to be
cleaned-up by removing callbacks and previous elements.

Closes #3944

Closes #3948
2015-09-02 19:00:17 +00:00
Victor Berchet 44a991e245 refactor(test_lib): do not execute jasmine test as async if not required
fixes #3893
2015-09-01 17:49:24 -07:00
Jason Teplitz 358908e605 feat(WebWorker): Expose MessageBroker API
Closes #3942
2015-09-01 23:53:54 +00:00
Misko Hevery b9cf945b30 chore(di): do not double export DI 2015-09-01 13:28:15 -07:00
Misko Hevery 5b8ce1e42a chore(http.d.ts): have http properly reexport core types 2015-09-01 13:28:15 -07:00
Tim Blasi 7c7888de4f fix(ComponentUrlMapper): support relative template URLs in Dartium
When running in Dartium without using transformers (i.e. with a normal
static web server), handle relative template URLs. This works by using
mirrors to get the URL of the library where the component class is
defined.

Closes #2771

Closes #3743
2015-09-01 18:19:55 +00:00
vsavkin 60ce884671 feat(core): remove the (^ syntax and make all DOM events bubbling
BREAKING CHANGE

Before
<div (^click)="onEventHandler()">
  <button></button>
</div>

After
<div (click)="onEventHandler()">
  <button></button>
</div>

Closes #3864
2015-09-01 15:54:47 +00:00
Brian Ford ad1bd5fc11 refector(router): rename outlet integration spec to navigation spec
The new name better reflects the behavior under test.
2015-08-31 23:24:09 +00:00
Isaac Park 3791c4a682 fix(RouteRegistry): initialize RouteParams.params
Fix a bug caused by RouteRegistry.generate not initializing RouteParams.params to a StringMap

Closes #3755
2015-08-31 22:02:50 +00:00
Victor Berchet ecf6ba3974 refactor: prefer const over var for constants
Closes #3818
2015-08-31 21:59:33 +00:00
Victor Berchet b29b045d78 refactor(WTF): rename scopes to follow coding conventions 2015-08-31 21:59:33 +00:00
Misko Hevery c349bbbc08 refactor(ViewEncapsulation): rename to PascalCase
BREAKING CHANGE

- ViewEncapsulation.EMULATED => ViewEncapsulation.Emulated
- ViewEncapsulation.NATIVE => ViewEncapsulation.Native
- ViewEncapsulation.NONE => ViewEncapsulation.None

Closes #3889
2015-08-31 21:32:10 +00:00
Misko Hevery e916836261 chore(ts2dart): replace List with Array
Closes #3514
2015-08-31 21:32:10 +00:00
Misko Hevery 4415855683 refactor(ngProbe): rename to ng.probe
BREAKING CHANGE:

Closes #3786

- ngProbe => ng.probe
2015-08-31 21:32:10 +00:00
Misko Hevery cebd670a8e refactor(ChandeDetection): Rename ChangeDetectorRef.markForCheck
BREAKING CHANGE

Closes #3403

- ChangeDetectorRef.requestCheck() => ChangeDetectorRef.markForCheck()
2015-08-31 21:32:10 +00:00
Misko Hevery b8be4bfaaf fix(router): re-export of Type
Closes #3632

Closes #3704
2015-08-31 20:47:37 +00:00
Tim Blasi 6c3c6060a5 fix(core): Fix type error
Ensure that values passed to `DomRenderer#setElementAttribute` are
strings. Currently, booleans can be passed to this method, resulting in
failures when running in Dart checked mode.
2015-08-31 13:02:29 -07:00
Tim Blasi 46dd5fcbb0 refactor(transform): Remove reflection_entry_points parameter
Remove the now unnecessary `reflection_entry_points` parameter from the
Angular 2 transformer.

Support glob syntax for `entry_points`.
2015-08-31 13:02:29 -07:00
Jason Teplitz 9619636ba7 fix(WebWorker): WebWorkerRenderer removes views after they're destroyed
closes #3240

Closes #3894
2015-08-31 18:33:25 +00:00
Brian Ford fa2c6791b4 docs(router): improve docs for RouterOutlet methods
Closes #3909
2015-08-31 18:09:32 +00:00
Brian Ford ad16e9d910 refactor(router): move setting reuse flag from RouterOutlet to Router 2015-08-31 18:09:32 +00:00
Brian Ford 7de447e4b5 test(router): fix typo in spec name 2015-08-31 18:09:32 +00:00
Brian Ford 36eb9d392d feat(router): router-link-active CSS class support
The `[router-link]` directive now applies the `router-link-active` CSS
class to the associated element whenever the link is active.

Closes #3209
2015-08-31 18:09:32 +00:00
Brian Ford de37729823 feat(router): implement Router.isRouteActive 2015-08-31 18:09:32 +00:00
Brian Ford e1a7e0329c feat(router): hash-cons ComponentInstructions 2015-08-31 18:09:32 +00:00
Brian Ford 76e1f863a2 docs(router): add description for Url class 2015-08-31 18:09:32 +00:00
vsavkin d49bc438e8 feat(core): added afterContentInit, afterViewInit, and afterViewChecked hooks
Closes #3897
2015-08-31 17:16:54 +00:00
Tobias Bosch f93cd9ced7 feat(compiler): add full directive metadata and validation logic
With this, the new `TemplateParser` has feature/data parity with the `ProtoViewDto` of the `RenderCompiler`.

Part of #3605

Closes #3880
2015-08-28 14:55:47 -07:00
Tobias Bosch 0f4eb1b524 refactor(compiler): simplify metadata 2015-08-28 14:55:23 -07:00
Jason Teplitz 3468f7cfd5 chore(build): Add WebWorker bundle.
Closes #3207

Closes #3881
2015-08-28 20:40:16 +00:00
Marc Laval be07390859 refactor(test_lib): BrowserDetection util
Closes #3805
2015-08-28 11:41:17 +02:00
Misko Hevery 551d9a1688 chore(LifecycleEvent): change to PascalCase / rename
BREAKING CHANGE

Closes #3863

- LifecycleEvent.onInit => LifecycleEvent.OnInit
- LifecycleEvent.onDestroy => LifecycleEvent.OnDestroy
- LifecycleEvent.onChange => LifecycleEvent.OnChanges
- LifecycleEvent.onCheck => LifecycleEvent.DoCheck
- LifecycleEvent.onAllChangesDone => LifecycleEvent.AfterContentChecked
- OnCheck.onCheck() => DoCheck.doCheck()
- OnChange.onChange() => OnChanges.onChanges()
- OnAllChangesDone.onAllChangesDone() => AfterContentChecked.afterContentChecked

Closes #3851
2015-08-27 22:32:21 -07:00
Misko Hevery ac3f5106e4 refactor(view): remove hostActions
BREAKING CHANGE

Closes #3396

Replacement. Either direct DOM access or Renderer in WebWorkers.
2015-08-27 22:32:21 -07:00
Misko Hevery 37b042b361 chore: Make enum names consistent with TypeScript convention
BREAKING_CHANGE

Ts2Dart issue: https://github.com/angular/ts2dart/issues/270
TypeScript convention: https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines
DartConvertion: https://www.dartlang.org/articles/style-guide/

Rename:

- NumberFormatStyle.DECIMAL => NumberFormatStyle.Decimal
- NumberFormatStyle.PERCENT => NumberFormatStyle.Percent
- NumberFormatStyle.CURRENCY => NumberFormatStyle.Currency
- RequestMethods.GET => RequestMethods.Get
- RequestMethods.POST => RequestMethods.Post
- RequestMethods.PUT => RequestMethods.Put
- RequestMethods.DELETE => RequestMethods.Delete
- RequestMethods.HEAD => RequestMethods.Head
- RequestMethods.PATCH => RequestMethods.Patch
- ReadyStates.UNSENT => ReadyStates.Unsent
- ReadyStates.OPEN => ReadyStates.Open
- ReadyStates.HEADERS_RECEIVED => ReadyStates.HeadersReceived
- ReadyStates.LOADING => ReadyStates.Loading
- ReadyStates.DONE => ReadyStates.Done
- ReadyStates.CANCELLED => ReadyStates.Canceled
2015-08-27 22:32:21 -07:00
Misko Hevery 69926dd002 refactor(change_detection): introduce enum ChangeDetectionStrategy
BREAKING CHANGE

Closes #2497

- change detection strategy type changes from string to ChangeDetectionStrategy
- CHECK_ONCE => ChangeDetectionStrategy.CheckOnce
- CHECKED => ChangeDetectionStrategy.Checked
- CHECK_ALWAYS => ChangeDetectionStrategy.CheckAlways
- DETACHED => ChangeDetectionStrategy.Detached
- ON_PUSH => ChangeDetectionStrategy.OnPush
- DEFAULT => ChangeDetectionStrategy.Default
- ON_PUSH_OBSERVE => ChangeDetectionStrategy.OnPushObserve
2015-08-27 21:41:46 -07:00
vsavkin 3bb27deecc feat(exception_handler): changed ExceptionHandler to use console.error instead of console.log
Closes #3812
2015-08-28 00:09:01 +00:00
Tim Blasi 02d9e18279 chore(transform): Move registrations tests to modules_dart
This moves tests which were created in 104302a958
and were not moved in 88a5b8da0f.
2015-08-27 20:54:47 +00:00