Commit Graph

2941 Commits

Author SHA1 Message Date
vsavkin e82a35d1fd feat(forms): add minlength and maxlength validators
Closes #4705
2015-10-13 21:42:12 +00:00
Marc Laval e15e2428c5 fix(test): command compiler attr merge test in IE 2015-10-13 13:39:32 -07:00
Alex Rickabaugh 3a801c16fa fix(docs): minor @link fixes.
Closes #4696
2015-10-13 20:24:55 +00:00
Matias Niemelä 1bc35208df test(router): add testing code for querystring serialization 2015-10-13 12:06:22 -07:00
Matias Niemelä ea661fa10f chore(examples): extend inbox example code to include sorting 2015-10-13 12:06:22 -07:00
Brian Ford c0b7bae9d3 test(router): add missing tests for the url parser 2015-10-13 12:06:22 -07:00
Brian Ford 8bc40d3f4d fix(router): properly read and serialize query params
This splits out `path` and `query` into separate params for `location.go`
and related methods so that we can handle them properly in both `PathLocationStrategy`
and `HashLocationStrategy`.

This handles the problem of not reading query params to populate `Location` on the
initial page load.

Closes #3957
Closes #4225
Closes #3784
2015-10-13 12:06:22 -07:00
Brian Ford 440fd11c72 feat(facade): add fromISODate method 2015-10-13 12:06:22 -07:00
Julie Ralph f529236bfc refactor(test): rename test_lib to testing
Old test_lib is now testing_internal
test_lib_public is now testing
2015-10-13 10:36:49 -07:00
Julie Ralph a1fa2e472f feat(test): Add an external version of the test library
Adds test adapters for TypeScript and JavaScript only, exported
as part of the test_lib module. These work with the Jasmine test
framework, and allow use of the test injector within test blocks
via the `inject` function.

See #4572, #4177, #4035, #2783

This includes the TestComponentBuilder. It allows using the
test injector with Jasmine bindings, and waits for returned
promises before completing async test blocks.
2015-10-12 23:14:03 -07:00
Alex Eagle 947bf11cb6 chore(docs): copy [Decorator]Metadata docs to the [Decorator]
This allows editors to show the docs when users navigate to definition.

See #4668

Closes #4683
2015-10-13 00:30:24 +00:00
vsavkin 1aeafd31bd feat(di): change the params of Provider and provide to start with "use"
Closes #4684
2015-10-12 21:09:09 +00:00
Pawel Kozlowski f443ecbfa6 refactor(router): use compiler's public API in imports
Closes #4662
2015-10-12 20:14:22 +00:00
Pawel Kozlowski 8667b760f4 refactor(router): use DI imports from public API
This allows us to create smaller CJS bundles for router,
where the bundle doesn't duplicate code from angular2 core.
2015-10-12 20:14:22 +00:00
Igor Minar 6abed8d996 fix(test_lib): don't mock out XHR via MockXHR by default in tests
This is useful for the compiler tests, but otherwise it's not useful.

Additionally if an application has external templates (as is common) then
we should actually fetch these templates in tests.

Fixes #4539

Closes #4682
2015-10-12 17:45:19 +00:00
Tobias Bosch eacc8e3803 fix(compiler): merge `class` and `style` attributes from the element with the host attributes
Closes #4583
Closes #4680
2015-10-12 15:35:49 +00:00
Marc Laval 0def28e594 fix(compiler): shadow CSS @import test in some browsers
Closes #4629
2015-10-12 00:28:07 +02:00
Alex Eagle b96784756c chore(docs): remove @View decorator from examples in docs
Closes #4666
2015-10-11 22:02:38 +00:00
vsavkin 62005dd127 docs(core): fix links in core docs 2015-10-11 14:42:36 -07:00
vsavkin 52ebb8f0dd docs(di): fix links di docs 2015-10-11 14:42:15 -07:00
Victor Berchet 35878c559f doc(LifecycleHooks): change Property for Input
Closes #4652
2015-10-11 16:44:28 +00:00
Pawel Kozlowski 0c1f9dab54 refactor(http): use shared code from public 'angular2/angular2' namespace
Closes #4648
2015-10-11 11:38:19 +00:00
vsavkin 1eb0162cde feat(di): rename Binding into Provider
Closes #4416

Closes #4654
2015-10-11 05:13:31 +00:00
vsavkin 7c6130c2c5 feat(core): desugar [()] to [prop] and (prop-change)
BREAKING CHANGE

Before

```
<cmp [(prop)]="field"> was desugared to <cmp [prop]="field" (prop)="field=$event">
```

After
```
<cmp [(prop)]="field"> is desugared to <cmp [prop]="field" (prop-change)="field=$event">
```

Closes #4658
2015-10-11 02:58:13 +00:00
Pawel Kozlowski df09389df8 docs(NgClass): update docs, add example
Closes #4520
2015-10-10 11:42:25 +00:00
Alex Rickabaugh 90191ce261 refactor(router): use ApplicationRef to provide the first bootstrapped component as ROUTER_PRIMARY_COMPONENT automatically.
This removes the routerBindings function as it is no longer necessary. ROUTER_BINDINGS will automatically pick the first bootstrapped component to satisfy ROUTER_PRIMARY_COMPONENT.

BREAKING CHANGE:

Before: bootstrap(MyComponent, [routerBindings(myComponent)]);
After: bootstrap(MyComponent, [ROUTER_BINDINGS]);

Closes #4643
2015-10-10 05:19:55 +00:00
Misko Hevery 19c1bd7375 feat(ngUpgrade): transclude content from ng2->ng1
Closes #4640
2015-10-09 21:41:56 -07:00
Misko Hevery 84c3124292 chore(ngUpgrade): cleanup TS errors 2015-10-09 21:25:48 -07:00
Misko Hevery cd90e6ed8f feat(ngUpgrade): support for content project from ng1->ng2 2015-10-09 21:25:45 -07:00
Alex Eagle 867c08ac84 chore(typings): mark underscore methods @internal.
This allows TypeScript to produce an API surface which matches the Dart semantics.
I found these with:
gulp build.js.dev && find dist/js/dev/es5/angular2/src -name "*.d.ts" -exec grep -H -n '^ *_' {} \;

Closes #4638
2015-10-10 02:18:33 +00:00
Alex Eagle 95f984615b Produce .d.ts files from our typescript compilation.
Deliver them into our npm module output so users can consume them directly.

Fixes #3082
2015-10-10 02:18:33 +00:00
Victor Berchet 393b0526b4 refactor(NgZone): improve types
Closes #4642
2015-10-09 23:54:31 +00:00
Tobias Bosch 6207b1af88 feat(ngFor): support a custom template
Part of #1989

Closes #4637
2015-10-09 21:52:59 +00:00
Victor Berchet a8c34ae290 refactor(MapWrapper): drop delete(), get(), forEach() and size
Closes #4618
2015-10-09 20:07:43 +00:00
Alex Eagle aab0c57aee fix(typings): add more missing typings.
This is the same bug pattern I reported in https://github.com/Microsoft/TypeScript/issues/5187

Closes #4636
2015-10-09 19:00:42 +00:00
Alex Eagle c178ad476e fix(typings): fix typings which were previously unchecked
Closes #4625
2015-10-09 16:23:30 +00:00
Alex Eagle 597f79e0c7 fix(typings): missing types in ListWrapper typings 2015-10-09 16:23:30 +00:00
Shahar Talmi 31f48ae943 refactor(ngOutlet): using some typescript features
Closes #4386
2015-10-09 03:40:42 +00:00
Shahar Talmi 1272affe5c refactor(ngOutlet): move to typescript 2015-10-09 03:40:42 +00:00
Shahar Talmi 431ac33c26 refactor($router): removed some redundant code 2015-10-09 03:40:42 +00:00
Pascal Precht cd2050b6e0 docs(router): route alias has to be written in PascalCase
Closes #4547
2015-10-09 03:25:51 +00:00
Brandon Roberts 075011f2fe fix(docs): Updated docs for default router location strategy
Closes #4517
2015-10-09 02:57:10 +00:00
vsavkin 1100c9b1e3 fix(web-workers): fix bindings 2015-10-08 16:42:34 -07:00
vsavkin f3ab527688 resolve rebase conflicts 2015-10-08 13:59:09 -07:00
vsavkin bba0248989 fix(core): remove NgZone_ and use NgZone instead 2015-10-08 13:55:26 -07:00
vsavkin 14fa00791e fix(analyzer): fix dart analyzer errors 2015-10-08 13:54:44 -07:00
vsavkin d60c7a9118 fix(tests): fixes public api spec 2015-10-08 13:54:44 -07:00
vsavkin d63f3c123e fix benchmarks 2015-10-08 13:54:44 -07:00
vsavkin 8b725c77fd fix(tests): fix tests 2015-10-08 13:54:44 -07:00
Alex Eagle 5458036de7 fix(typings): update test.typings for abstract superclasses 2015-10-08 13:54:43 -07:00
Alex Eagle 6075509f26 chore(typing): extract abstract superclasses to replace @private constructors 2015-10-08 13:54:43 -07:00
Brian Ford ee32b1bc37 feat(router): allow async routes to be defined with "loader" 2015-10-08 12:29:14 -07:00
Tobias Bosch 6d4bd5d901 fix(render): recurse into components/embedded templates not until all elements in a view have been visited
Fixes #4551
Closes #4601
2015-10-08 11:43:21 -07:00
Eric Mendes Dantas 21b53c3143 docs(http) remove .toRx() from http calls
Closes #4578
2015-10-08 17:41:15 +00:00
Yegor Jbanov 04b3dee667 fix(css): when compiling CSS, leave absolute imports alone
Closes #4592
2015-10-08 16:39:32 +00:00
Victor Berchet 6b00b60488 fix(XhrBackend): setRequestHeader takes a string arg
Closes #4597
2015-10-08 15:59:10 +00:00
Julie Ralph af1119063c chore(ci): update Protractor version, remove custom waits
The latest Protractor version supports waiting for Angular2 applications,
so remove custom waiting logic.

Closes #3829
2015-10-07 13:08:58 -07:00
Victor Berchet aee176115b refactor(ListWrapper): drop forEach and removeLast
Closes #4584
2015-10-07 17:17:31 +00:00
Victor Berchet 4ed642f921 refactor(AppRootUrl): simplify the code
Closes #4563
2015-10-07 15:20:32 +00:00
Pawel Kozlowski a7b2ab771e docs(NgStyle): update docs, add examples
Closes #4519
2015-10-07 13:24:48 +00:00
Victor Berchet a0277f1b3a refactor: add missing types for ts2dart
Closes #4568
2015-10-07 06:39:14 +00:00
Victor Berchet aaa215514b refactor(ListWrapper): get ride of ListWrapper.map 2015-10-07 06:39:14 +00:00
Victor Berchet b6537ad609 refactor(ListWrapper): get ride of ListWrapper.join 2015-10-07 06:39:14 +00:00
Igor Minar 62e14dc529 build(bundle): fix angular2/test_lib bundle to reexport test_lib rather than test
Closes #4556
2015-10-07 04:49:46 +00:00
Igor Minar 15ab6f6ea8 fix(location): improve the 'No base href set' error message 2015-10-06 20:59:02 -07:00
vsavkin dea6a4593b cleanup(core): making @View optional
Closes #4566
2015-10-07 02:16:42 +00:00
vsavkin d38689677c example(core): update hellow world example to use components without @View 2015-10-07 02:16:42 +00:00
vsavkin bd31b01690 feat(core): add syntax sugar to make @View optional 2015-10-07 02:16:42 +00:00
Alex Eagle f7aa890ade chore(docs): rename @private to @internal
The latter is understood by TypeScript's --stripInternal option, so this lets us
rely more on the tooling provided by typescript team.
2015-10-06 17:08:41 -07:00
Rob Wormald 4a36fd8203 fix(core): make .toRx() return Subject
this was broken in the original great RxNext migration.
fixes #4521

Closes #4540
2015-10-06 23:27:35 +00:00
Tim Blasi a4869c874b build(dart): Remove unused Dart benchmarks 2015-10-06 14:11:03 -07:00
Misko Hevery 8e1d2fb325 feat(upgrade): support binding of Ng1 form Ng2
Closes #4542
2015-10-06 19:08:56 +00:00
Igor Minar 4ebb1a9096 fix: add test_lib.d.ts to type definitions in generated package.json 2015-10-06 10:12:53 -07:00
Michał Gołębiowski 9679fc94f6 fix(shims): Don't rely on prefixed requestAnimationFrame
The `ms` & `moz` prefixes are not needed. `ms` was never available in a public
IE release (IE 10 has an unprefixed version) and Firefox has unprefixed
rAF since v24 - current version is 41. Even more, Firefox versions below 22
don't have cancelAnimationFrame so it's better to not use the prefixed version
at all to avoid surprises.

The `o` prefix is also useless - Opera Presto never had rAF and the
Chromium-based Opera doesn't use the `o` prefix.

Also, switched from `new Date().getTime()` to `Date.now()` as it's supported
everywhere (even in Android 2.3) except IE<9 and it avoids a useless date
object construction.

See http://caniuse.com/#feat=requestanimationframe for more info.

Refs 4f56a01b3b

Closes #4394
2015-10-06 09:38:49 -07:00
Alex Eagle 6093e28b61 fix(typings): repair broken typechecks
We had the typechecker disabled by accident, and many problems snuck in

Fixes #4507

Closes #4508
2015-10-06 13:28:17 +00:00
Misko Hevery 09371a3f0b feat(upgrade): support binding of Ng2 form Ng1
Closes #4458
2015-10-05 19:37:31 +00:00
Tobias Bosch 0b3e4fa090 refactor(core): move `ViewEncapsulation` and `ViewType` to the right places
Closes #4526
2015-10-05 11:22:21 -07:00
Tobias Bosch 0299d4af00 fix(core): keep styles for `ViewEncapsulation.Native` isolated per component
BREAKING CHANGE:
- `Renderer.registerComponent` now takes an additional argument.

Fixes #4513
Closes #4524
2015-10-05 10:34:42 -07:00
Tobias Bosch a9aef8e5e6 fix(core): set `ViewEncapsulation.Emulated` as the default again
Fixes #4494
2015-10-05 10:33:58 -07:00
Tobias Bosch 6fe8b85295 fix(render): keep bindings of components in content and view in the right order
Bindings in the component view have to be first, before 
bindings of components in the light dom (i.e. have the same
order as used in the `ViewManagerUtils.createView()` method.

Fixes #4522
Closes #4523
2015-10-05 10:10:47 -07:00
Pawel Kozlowski 649d310c31 chore: remove traceur from package.json published to npm
Closes #4498
2015-10-05 02:47:49 +00:00
Igor Minar 150cc22532 fix(http): add missing semicolon 2015-10-03 10:05:11 -07:00
Alex Eagle 208f3d4c65 fix(typings): repair broken type-checking for StringMap
Note that the previous type of StringMap was overly permissive and didn't catch errors.
Also we have to explicitly type empty objects, which is explained here:
https://github.com/Microsoft/TypeScript/issues/5089

Closes #4487
2015-10-03 01:09:42 +00:00
Alex Eagle 7c4199cd1c chore(typings): remove StringMap
This was a poorly typed attempt to mimic TypeScript's index signatures,
which we can use instead.
This eliminates a very strange type that we were exposing to users, but
not re-exporting through our public API.

Fixes #4483
2015-10-03 01:09:42 +00:00
Rob Wormald 01fb06a377 chore(http): Use Observables in Http
- Remove ObservableWrapper/EventEmitter from Http.
- Temporarily use complete Rx build w/ all operators.
2015-10-02 17:20:25 -07:00
vsavkin c9901c5fe0 feat(core): support properties and events in addition to inputs and outputs to make transition easier
Closes #4482
2015-10-02 23:23:15 +00:00
Marc Laval b44c13bc46 fix(compiler): const is not supported in IE9 and IE10
Closes #4465
2015-10-02 21:49:44 +00:00
Tobias Bosch 6ae9686a0d fix(benchpress): update build step, read and config
Closes #4419
2015-10-02 14:42:15 -07:00
Tobias Bosch 4342a1eb7b refactor(core): move DI bindings of compiler into core/compiler/compiler.ts
Closes #4470
2015-10-02 13:39:14 -07:00
Tobias Bosch 13161ae5aa refactor(core): move APP_ID from render/dom/dom_tokens into application_tokens 2015-10-02 13:38:52 -07:00
Tobias Bosch 6b5d345a2b refactor(core): adjust imports for move files to the right place
- render/xhr_* -> compiler/xhr_*
- render/event_config -> linker/event_config
- render/dom/schema -> compiler/schema
- render/dom/compiler/* -> compiler/*
- render/dom/view/shared_styles_host -> render/dom/shared_styles_host
2015-10-02 13:38:51 -07:00
Tobias Bosch 2450a3c5b0 refactor(core): move files to the right place
- render/xhr_* -> compiler/xhr_*
- render/event_config -> linker/event_config
- render/dom/schema -> compiler/schema
- render/dom/compiler/* -> compiler/*
- render/dom/view/shared_styles_host -> render/dom/shared_styles_host
- services/url_resolver -> compiler/url_resolver
- services/app_root_urlo -> compiler/app_root_url
2015-10-02 13:38:51 -07:00
mgechev 34518f0f2d feat(http): Add support for strings as http method names
Closes #4331
2015-10-02 11:33:49 -07:00
Igor Minar a251df9df4 docs: api docs for Renderer and all the related apis
Closes #4459
2015-10-02 17:05:48 +00:00
Victor Berchet a110ce95dc doc(LifecycleHooks): update API doc
Closes #4357
2015-10-02 16:44:48 +00:00
Tobias Bosch e8e57cdd73 refactor(core): adjust imports for rename angular2/src/compiler -> angular2/src/core/compiler 2015-10-02 08:59:43 -07:00
Tobias Bosch aa3d94149f refactor(core): rename angular2/src/compiler -> angular2/src/core/compiler 2015-10-02 08:42:12 -07:00
Tobias Bosch 6248a5e846 refactor(core): move core/compiler to core/linker, adjust imports 2015-10-02 08:42:12 -07:00
Tobias Bosch 9f4fa1ab0a refactor(core): move core/compiler to core/linker 2015-10-02 08:42:11 -07:00
Tobias Bosch d21c7bdf90 refactor(compiler): remove unused code
BREAKING CHANGE:
- Removes `ChangeDetection`, use a binding for `ChangeDetectorGenConfig` instead
  to configure change detection.
- `RenderElementRef.renderBoundElementIndex` was renamed to `RenderElementRef.boundElementIndex`.
- Removes `ViewLoader`, use `XHRImpl` instead.
2015-10-01 22:27:41 -07:00
Tobias Bosch 76247b7097 refactor(compiler): use the new compiler everywhere
Closes #3605

BREAKING CHANGE:
- we don't mark an element as bound any more if it only contains text bindings
  E.g. <div>{{hello}}</div>
  This changes the indices when using `DebugElement.componentViewChildren` / `DebugElement.children`.
- `@Directive.compileChildren` was removed,
  `ng-non-bindable` is now builtin and not a directive any more
- angular no more adds the `ng-binding` class to elements with bindings
- directives are now ordered as they are listed in the View.directives regarding change detection.
  Previously they had an undefined order.
- the `Renderer` interface has new methods `createProtoView` and `registerComponentTemplate`. See `DomRenderer` for default implementations.
- reprojection with `ng-content` is now all or nothing per `ng-content` element
- angular2 transformer can't be used in tests that modify directive metadata.
  Use `angular2/src/transform/inliner_for_test` transformer instead.
2015-10-01 18:48:27 -07:00
Yegor Jbanov 841f8789fd refactor(transformer): precompile stylesheets
Part of #3605
2015-10-01 18:48:27 -07:00
Misko Hevery a5622304de fix(upgrade): assert correct interleaving of evaluation.
Closes #4436
2015-10-01 23:07:43 +00:00
Misko Hevery 074e289e62 chore(upgrade): inline the tests for better readability 2015-10-01 23:07:43 +00:00
vsavkin 617acf4cd6 docs(core): add docs to HostBinding and HostListener 2015-10-01 15:47:51 -07:00
Pawel Kozlowski a87ebb28e2 docs(CORE_DIRECTIVES): improve docs for CORE_DIRECTIVES
Closes #4310
2015-10-01 08:49:46 +00:00
vsavkin adbfd29fd7 feat(core): renames Property into Input and Event into Output
BREACKING CHANGE:

Before: @Directive({properties: ['one'], events: ['two']})
After: @Directive({inputs: ['one'], outputs: ['two']})

Before: @Component({properties: ['one'], events: ['two']})
After: @Componet({inputs: ['one'], outputs: ['two']})

Before: class A {@Property() one; @Event() two;}
After: class A {@Input() one; @Output() two;}
2015-10-01 04:36:23 +00:00
Marc Laval 33593cf8a2 fix(build): Use Angular's testability API to wait for end of e2e tests
Closes #3911
2015-10-01 03:41:10 +00:00
vsavkin 00a4b2e28f feat(forms): make NgControl -> NgValueAccessor dependency unidirectional
Closes #4421
2015-10-01 01:47:18 +00:00
vsavkin 7b2d8fce07 refactor(forms): extract NgControlStatus 2015-10-01 01:47:18 +00:00
vsavkin cec4b36d9b fix(change_detection): _throwError should not mask the original exception 2015-09-30 18:18:28 -07:00
Marc Laval eafa482052 chore(saucelabs): add latest Safaris
Closes #4411
2015-09-30 21:38:04 +00:00
vsavkin 3aa204791b feat(query): make QueryList notify on changes via an observable
BREAKING CHANGE:

Before: query.onChange(() => ...);
After: query.changes.subscribe((iterable) => {});

Closes #4395
2015-09-30 15:45:16 +00:00
Alex Eagle 9b7378d132 chore(typings): remove traceur-runtime.d.ts
fixes #4297

Closes #4415
2015-09-30 00:07:16 +00:00
Alex Eagle b4fe590b2d chore(ts): fix TODOs that were pending on 1.6 upgrade
Closes #4377
2015-09-29 03:23:25 +00:00
Tobias Bosch 8ff65a30c7 refactor(compiler): don’t require `id` in metadata and use `appId`
The output of the compiler has to be the same
given the same input. Requiring a unique id for
every type already during compilation makes it
hard to parallelize compilation.

Part of #3605
Closes #4397
2015-09-28 19:47:24 -07:00
Alex Rickabaugh a7b8624b55 docs(forms): Documentation and examples for Control, ControlGroup, and ControlArray.
Closes #4398
2015-09-29 00:08:21 +00:00
Alex Rickabaugh 7ae74cf91d docs(forms): FORM_BINDINGS and FORM_DIRECTIVES 2015-09-29 00:08:21 +00:00
mgechev 6a6396963f refactor(http): remove useless constant
Closes #4364
2015-09-29 00:06:27 +00:00
mgechev 4319563bba docs(http): add language annotations and fix method value to enum
Closes #4348
2015-09-29 00:03:00 +00:00
cexbrayat e2f5d87ff7 fix(services): export title service
Signed-off-by: cexbrayat <cedric@ninja-squad.com>

Closes #4271
2015-09-28 23:23:40 +00:00
Alex Rickabaugh 7714d6a6eb fix(forms): avoid issues with nulls checking on validation status and other form states.
Closes #4338
2015-09-28 21:01:51 +00:00
Rob Wormald a88e6f3106 refactor(http): use Observables in Http backends
BREAKING CHANGE: Http now returns Rx Observables directly, so calling .toRx() is no longer necessary. Additionally, Http calls are now cold, so backend requests will not fire unless .subscribe() is called.

closes #4043 and closes #2974

Closes #4376
2015-09-27 22:15:30 +00:00
Igor Minar af9f916a9c docs(compiler): compiler/view related api docs
Closes #4268
2015-09-25 23:03:24 +00:00
Igor Minar d348e5051f docs(Type): improve api docs 2015-09-25 23:03:24 +00:00
Igor Minar 7771ef4873 refactor: rename all "atIndex" parameters to just "index"
This makes it easier to word the documentation of the signature.
2015-09-25 23:03:24 +00:00
Igor Minar 7ee295ad94 docs(compiler): compiler related api docs 2015-09-25 23:03:24 +00:00
Victor Berchet 0319417a1b feat(Binding): improve errors
fix #4358

Closes #4360
2015-09-25 22:05:36 +00:00
vsavkin 5bf6a3af15 chore(typescript): fixes dart failures and linter
Closes #4359
2015-09-25 20:15:55 +00:00
Alex Eagle 7a53f82516 chore(typescript 1.6 upgrade): fix build.js and docs 2015-09-25 20:15:55 +00:00
Tobias Bosch 1cf45757cd feat(render): add generic view factory based on the template commands
Part of #3605
Closes #4367
2015-09-25 11:56:58 -07:00
Tobias Bosch 0ed6fc4f6b fix(compiler): minor cleanups and fixes
Part of #3605
2015-09-25 11:27:39 -07:00
Marc Laval 9c9769047d fix(test): StyleCompiler tests failing in Android browsers
Closes #4351
2015-09-25 07:34:17 +00:00
Tobias Bosch 5f640c79bb refactor(compiler_benchmark): simplify by using bootstrap and DI
Closes #4356
2015-09-25 04:01:14 +00:00
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
Richard Sentino 256b2dc9b7 chore: remove ENUM_INDEX from facade
The ENUM_INDEX utility was added to return the index of an enum
consistently between Dart and TypeScript, so that the index
could be used to look up the name of the enum. Since dart is no
longer supported by Http, and since no other part of the framework
is using this function, it has been removed.

Closes #3843
2015-08-27 08:39:24 -07:00
Richard Sentino 51285666d8 chore(http): remove RequestMethodsMap
This class was only added to do a reverse lookup of
RequestMethods enum to get its name (i.e. "GET") for Dart.
Since Dart is no longer supported by Http, method names
can just be retrieved with TypeScript's support for
enum name lookup,
i.e. RequestMethods[RequestMethods.GET] === 'GET',
making the RequestMethodsMap utility obsolete.

Closes #2904
2015-08-27 08:36:40 -07:00
Marc Laval 557d309377 chore(build): improve reliability of the saucelabs job
Closes #3848
2015-08-27 09:46:15 +02:00
Jason Teplitz 4ba4427510 feat(WebWorkers): Add WebSocket MessageBuses for debugging apps
Closes #3858
2015-08-26 19:07:53 -07:00
Tobias Bosch 9f576b0233 feat(compile): add HtmlParser, TemplateParser, ComponentMetadataLoader
First bits of new compile pipeline #3605
Closes #3839
2015-08-27 00:05:48 +00:00
vsavkin 343dcfa0c0 refactor(tests): removed @IMPLEMENTS 2015-08-26 15:06:25 -07:00
Tim Blasi 457eb5d69c fix(WebWorker): Return boolean from `dispatchRenderEvent`
Update web_worker `dispatchRenderEvent` to return a boolean, which
[view.ts](https://github.com/angular/angular/blob/master/modules/angular2/src/core/render/dom/view/view.ts#L85) expects.
2015-08-26 14:12:45 -07:00
Tim Blasi 5863f50316 chore(transform): Remove reflection_entry_points from examples pubspec
Specifying `reflection_entry_points` is no longer necessary for most
Angular 2 apps.

Closes #3850
2015-08-26 17:36:26 +00:00
Jeff Cross 8ed22ce6e7 chore: update all import paths 2015-08-25 15:33:23 -07:00
Jeff Cross 10437ab85c fix(http): change type declarations to interfaces and export EventEmitter 2015-08-25 15:33:22 -07:00
Jeff Cross 38a5a2a955 chore: move core modules into core directory
BREAKING CHANGE:
    This change moves the http module into angular2/, so its import
    path is now angular2/http instead of http/http.

    Many other modules have also been moved around inside of angular2,
    but the public API paths have not changed as of this commit.
2015-08-25 15:33:22 -07:00
Marc Laval c2279dd651 fix(build): make e2e tests faster
Closes #3822
2015-08-25 17:04:46 +00:00
Ted Sander 9cc1cd29ed feat(url_resolver): Allow a developer to customize their package prefix
Allow a developer to specify a package prefix where the 'package:' dart urls
will be resolved. By default this will be '/packages' keeping the current
behavior, but allows for flexibility of different environments where a
developer may not control their directory structure.

Closes #3794
2015-08-25 16:53:06 +00:00
Alex Eagle 894af28529 fix(typings): include static members
Fixes #3175

Closes #3780
2015-08-25 16:49:37 +00:00
Jason Teplitz 21f60c5dce refactor(WebWorker): Abstract message passing and serialization to UIMessageBroker
closes #3703

Closes #3815
2015-08-25 03:18:22 +00:00
Brian Ford aeef19e2a6 refactor(router): reorganize 2.x tests 2015-08-24 20:55:50 +00:00
Brian Ford 64ffd9e99c refactor(router): split 1.x tests into separate files 2015-08-24 20:55:50 +00:00
unknown 944ccc9a94 Removed unused parameter
Closes #3810
2015-08-24 20:41:05 +00:00
Brian Ford 3963e0ab39 refactor(router): rename HTML5LocationStrategy to PathLocationStrategy
"HTML5" is a bit confusing. We want to differentiate between persisting location state
to the URL path, and the URL hash. Hence `PathLocationStrategy`.

BREAKING CHANGE

`HTML5LocationStrategy` -> `PathLocationStrategy`

Closes #3776
2015-08-24 12:13:53 -07:00
keertip a191c89193 refactor(dart/analyzer plugin): update to latest version of plugins
Closes #3681
2015-08-24 16:45:21 +00:00
Pascal Precht 5725f71777 fix(http): allow using JSONP_INJECTABLES and HTTP_INJECTABLES in same injector
Fixes #3365

Closes #3390
2015-08-23 22:20:23 -07:00
Jeff Cross 88a5b8da0f chore(transform): move transform module to modules_dart
The build/pure-packages.dart gulp task has also been updated to move the files into the angular2 tree.
Closes #3729
2015-08-24 03:39:07 +00:00
Rado Kirov 92da5430e7 fix(injector): support getRootInjectors on dehydrated injectors.
Closes #3760
2015-08-24 02:41:43 +00:00
Marc Laval 50eee42668 chore(build): add Android to CI
Closes #3756
2015-08-24 00:28:07 +02:00
Victor Berchet 5f0a0fd8d2 fix(wtf): fix NgZone.run instrumentation
Closes #3788
2015-08-23 18:52:09 +00:00
Pawel Kozlowski b039ec3da3 fix(parser): detect and report interpolation in expressions
Fixes #3645

Closes #3750
2015-08-23 14:06:30 +00:00
Pawel Kozlowski 5ee9630be1 docs(CORE_DIRECTIVES): documentation update after renames
Closes #3791
2015-08-23 12:53:16 +00:00
Pawel Kozlowski c4044102d6 test(ViewMetadata): use ViewMetadata consistently in tests
Closes #3746
2015-08-23 10:47:23 +00:00
Pawel Kozlowski 215c4aa8fb fix(compiler): detect and report error for views with empty templateUrl
Fixes #3762

Closes #3768
2015-08-23 07:26:56 +00:00
Pawel Kozlowski 3871f89119 fix(ViewLoader): provide componentId in missing template / templateUrl errors
Befor this change it wasn't clear which component is faulty
2015-08-23 07:26:56 +00:00
Misko Hevery 5d403966d5 refactor: rename web-workers to web_workers
Closes #3683
2015-08-22 14:20:33 -07:00
vsavkin e8e430e630 feat(change_detection): added support for observable components and directives 2015-08-21 15:44:45 -07:00
vsavkin a9ce454b21 fix(change_detection): fixed reflect properties as attributes
Closes #3761
2015-08-21 19:08:32 +00:00
vsavkin b6146394ae refactor(change_detection): replaced devMode with ChangeDetectorGenConfig 2015-08-21 19:08:32 +00:00
Jason Teplitz 764726d78e refactor(ApplicationRef): Move ApplicationRef to its own file
Closes #3763
2015-08-21 10:17:40 -07:00
Marc Laval 65344fcac9 chore(build): add IE9 to CI
Closes #3747
2015-08-21 15:46:26 +00:00
ericmartinezr 9d44ae3d32 fix(docs) Added more readable links
Follows https://github.com/angular/angular/pull/3677

I hope this works.
2015-08-21 05:17:28 +00:00
vsavkin d2d0715568 feat(change_detection): do not reparse AST when using generated detectors 2015-08-21 05:16:31 +00:00
Misko Hevery b986c54079 chore: remove int in favor for number
Closes #3511
2015-08-21 05:10:31 +00:00
yjbanov 8336881a85 feat: track unused reflection data 2015-08-20 18:20:53 -07:00
Marc Laval b0d27ee896 chore(build): add IE10 to CI 2015-08-21 00:16:34 +02:00
Marc Laval 9ba2ab5cea chore(build): add IE11 to CI 2015-08-21 00:16:33 +02:00
Marc Laval 1c9be9b5aa chore(build): add Firefox to CI 2015-08-21 00:16:33 +02:00
vsavkin 195c5c21d4 fix(change_detection): update the right change detector when using ON_PUSH mode
Previously, in a case where you have a mix of ON_PUSH and DEFAULT detectors, Angular would update the status of a wrong detector.
2015-08-20 21:55:50 +00:00
Misko Hevery 9afcb00216 fix: wtf paramater passing on scope
Closes #3726
2015-08-20 13:47:44 -07:00
Brian Ford bde6416b40 Revert "Revert "feat(router): add reuse support for angular 1.x router""
This reverts commit cef51a7e0d.
2015-08-20 13:19:58 -07:00
Brian Ford 06487237e5 Revert "Revert "feat(router): add angular 1.x router""
This reverts commit 298f1fb6a6.
2015-08-20 13:19:34 -07:00
Brian Ford 964884e761 Revert "Revert "refactor(router): move ROUTE_DATA token into own file""
This reverts commit abb3bd266b.
2015-08-20 13:19:18 -07:00
yjbanov 984e7b8e17 fix(dart): bad export in core.dart 2015-08-20 08:44:15 -07:00
Victor Berchet abb3bd266b Revert "refactor(router): move ROUTE_DATA token into own file"
This reverts commit 78a8ba2307.
2015-08-20 08:06:24 -07:00
Victor Berchet 298f1fb6a6 Revert "feat(router): add angular 1.x router"
This reverts commit fde026a9e4.
2015-08-20 08:06:14 -07:00
Victor Berchet cef51a7e0d Revert "feat(router): add reuse support for angular 1.x router"
This reverts commit ddb62feae6.
2015-08-20 08:06:07 -07:00
Shahar Talmi ddb62feae6 feat(router): add reuse support for angular 1.x router
Closes #3698
2015-08-19 20:27:39 +00:00
Brian Ford fde026a9e4 feat(router): add angular 1.x router 2015-08-19 20:27:39 +00:00
Brian Ford 78a8ba2307 refactor(router): move ROUTE_DATA token into own file
This change is to accomodate the router in Angular 1.x
2015-08-19 20:27:39 +00:00
Naomi Black ffc63fc6d6 docs(dgeni): fix a dgeni link error due to ambiguous link 2015-08-19 12:25:13 -07:00
Jason Teplitz 0b59e664ec feat(WebWorker) Add channel support to MessageBus
closes #3661 and #3686
2015-08-19 10:57:22 -07:00
Tim Blasi 104302a958 refactor(dart/transform): Remove unnecessary getter/setter codegen
Currently the transformer generates all getters and setters even when
creating pre-generated change detectors, which remove the need for them.

Generate getters and setters via the model provided by `ProtoViewDto`,
which contains enough information to allow omitting unnecessary getters
and setters from code output.

Allow generating getters, setters, and method names which are Dart
pseudo keywords.

Closes #3489
2015-08-19 17:36:12 +00:00
Tim Blasi ba2c077b01 refactor(core): Create reusable RecursiveAstVisitor in ast.ts 2015-08-19 17:36:12 +00:00
Pawel Kozlowski abb0e279a5 docs(metadata): correct ES5 annotation examples
Closes #3720
2015-08-19 15:55:49 +00:00
Marc Laval 873b6da120 chore(test): disable tests based on Intl API in non-Chrome browsers
Closes #3692
2015-08-19 09:45:34 +02:00
Victor Berchet f0e7f13f30 doc(NgStyle): fix missing []
Closes #3711
2015-08-19 05:46:55 +00:00
Misko Hevery ccfadb9b47 refactor: make bindings/directives names consistent
BREAKING CHANGE

- `routerDirectives` => `ROUTER_DIRECTIVES`
- `routerInjectables` => `ROUTER_BINDINGS`
- `ELEMENT_PROBE_CONFIG` => `ELEMENT_PROBE_BINDINGS`
2015-08-18 21:23:26 -07:00
Brian Ford 72e0b8f7dc fix(router): allow router-link to link to redirects
Closes #3335

Closes #3624
2015-08-19 01:34:46 +00:00
Brian Ford b5c4d8ba79 feat(facade): add maximum method for ListWrapper 2015-08-19 01:34:45 +00:00
Brian Ford 5c95b376b5 fix(router): subscribe should return subscription
Closes #3491

Closes #3695
2015-08-19 01:34:08 +00:00
gdi2290 f2d3bdb801 feat(http): xhr error listener invokes throw on EventEmitter
Closes #2667
2015-08-19 01:11:23 +00:00
Victor Berchet 3b9411cbeb chore: removed a VI tmp file
Closes #3706
2015-08-19 00:32:49 +00:00
PatrickJS 16eb8ced58 fix(http/http): allow for commonjs as ngHttp
when using the commonjs build for node the module ngHttp can not find module(s) `http/src/http`. currently
Closes #3633
2015-08-19 00:11:22 +00:00
ericmartinezr 63a94ee941 fix(docs) Fixes typo in ProtoViewRef class
Changed 'foctary' to 'factory'.

I wanted to change `{@link AppViewManager#createViewInContainer}` to `{@link AppViewManager#createViewInContainer}#createViewInContainer` and `{@link AppViewManager#createRootHostView}` to `{@link AppViewManager#createRootHostView}#createRootHostView` for readibility (see https://angular.io/docs/js/latest/api/core/ProtoViewRef-class.html it shows `AppViewManager and AppViewManager`). But I'm not sure if that'll work so I'm just going with the typo.
Closes #3677
2015-08-18 23:57:32 +00:00
Yegor Jbanov ddcfd465ad fix: <template> tag for browsers that do not suppor them
Closes #3636
2015-08-18 23:52:28 +00:00
Marc Laval 3b4965279c feat(browser): support Edge
Closes #3667
2015-08-18 23:07:59 +00:00
Ian Riley 675cb87c76 fix(examples): Modifies web worker examples to be compatible with systemjs 0.18.10.
Adds the rx path to each respective web worker loader.

Closes #3630
2015-08-18 21:45:12 +00:00
Ian Riley 8a7a783ff2 chore(build): Modifies replace scripts to reflect new changes in systemjs. 2015-08-18 21:45:12 +00:00
Ian Riley e68c978202 chore(npm): Upgrades systemjs to 0.18.3. 2015-08-18 21:45:12 +00:00
Rado Kirov 272ad61ab1 fix(injectors): reset the construction counter in dynamic strategy.
Adds tests for hydrate / dehydrate in cycle.

Closes #3635
2015-08-18 21:03:20 +00:00
yjbanov 5f7d4faa88 fix(docs): export bootstrap in core.ts but not in core.dart 2015-08-18 13:32:43 -07:00
gdi2290 235dec26fc fix(browser_adapter.ts): baseElement.getAttribute
currently throwing an error
```error
Error during instantiation of LocationStrategy! (RouterLink -> Router
-> Location -> LocationStrategy).
ORIGINAL ERROR: TypeError: baseElement.attr is not a function
```

Closes #3214
2015-08-18 19:07:47 +00:00
vsavkin 52da220016 feat(change_detection): added an example demonstrating how to use observable models
Closes #3684
2015-08-18 19:00:04 +00:00
vsavkin cbfc9cb344 feat(change_detection): added an experimental support for observables 2015-08-18 19:00:04 +00:00
Daniel Rasmuson ed81cb94b0 feat(router): user metadata in route configs
Provide the ability to attach custom data onto a route and retrieve
that data as an injectable (RouteData) inside the component.

Closes #2777

Closes #3541
2015-08-18 10:33:19 -07:00
Victor Berchet 1f54e64fcf feat(PropertyBindingParser): support onbubble-event as an alternate syntax for (^event)
fixes #3448

Closes #3616
2015-08-18 17:30:48 +00:00
Misko Hevery ea6673947c refactor: rename annotations to metadata
BREAKING CHANGE (maybe)

Well as long as our customers use public API this should not be a
breaking change, but we have changed import structure as well as
internal names, so it could be breaking.

import:
  angular2/annotations => angular2/metadata

Classes:
  *Annotations => *Metadata
  renderer.DirectiveMetadata => renderer.RendererDirectiveMetadata
  renderer.ElementBinder => renderer.RendererElementBinder
  impl.Directive => impl.DirectiveMetadata
  impl.Component => impl.ComponentMetadata
  impl.View => impl.ViewMetadata

Closes #3660
2015-08-17 21:23:25 +00:00
vsavkin 5e6317fecc feat(change_detection): request a change detection check when an event happens
Closes #3679
2015-08-17 19:08:03 +00:00
vsavkin 823fa4689e refactor(change_detection): generate handleEvent only when necessary 2015-08-17 19:08:03 +00:00
Rado Kirov 6c9e712c34 fix(query): do not visit dehydrated injectors. 2015-08-17 11:43:44 -07:00
vsavkin 4845583dcf refactor(change_detector): made change detection responsible for processing events
Closes #3666
2015-08-17 15:39:00 +00:00
Isaac Park 8b655c7be3 docs(annotations): replaces old syntax for hostListeners with host
Closes #3672
2015-08-17 14:38:18 +02:00
Pascal Precht a06f48e357 test(query_integration): remove duplicated change detection call
Closes #3673
2015-08-17 09:22:10 +00:00
Michael Goderbauer 841206c678 fix(testability): properly throw when no testability available 2015-08-15 19:44:58 -07:00
Jason Teplitz 296851797b fix(WebWorkers): Run XHR requests on the UI
Fixes issues in dart where dart:html is not available in isolates and
allows for better profiling of XHR requests

Closes #3652
2015-08-15 21:54:51 +00:00
Victor Berchet ee5df00146 refactor(directives): minor cleanup & refactoring
Closes #3629
2015-08-15 17:19:15 +00:00
Victor Berchet 89a0f2457d doc(di): minor fixes
Closes #3614
2015-08-15 16:06:01 +00:00
Brian Ford 26d2ea8afc fix(router): fix regression with generating links to async routes
Closes #3650
2015-08-14 22:32:48 +00:00
Rado Kirov 2686316c90 test(query): adds a view query test in presence of a long ng-for.
Closes #3638

Closes #3649
2015-08-14 21:04:29 +00:00
Pawel Kozlowski 83b69e8edc chore: add repository field to npm package.json files
Fixes #2366

Closes #3621
2015-08-14 18:09:52 +00:00
gdi2290 35a83b495a feat(query_list): delegate `toString` to `_results` array
Closes #3004
2015-08-14 03:42:11 +00:00
Victor Berchet 2fcb4cb769 test(Router): increase the timeout for the back button test
The test would fail on Ubuntu 15.04 + Chrome 46 with the standard
timeout.
2015-08-13 17:50:16 -07:00
vsavkin da4bcd5d91 docs: removed outdated docs
Closes #3581
2015-08-13 21:18:31 +00:00
Misko Hevery 512340e39b chore: Remove IRequestOptions / IResponseOptions
BREAKING CHANGE:

Reasons:

1) Interfaces should not start with letter ‘I’
2) Interfaces do not help with mistype properties, but literal types do.
   - https://github.com/Microsoft/TypeScript/pull/3823
   - https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#strict-object-literal-assignment-checking
2015-08-13 21:18:31 +00:00
Misko Hevery 284dc67076 chore: disable dart for HTTP package
BREAKING CHANGE

Stop supporting http module in Dart. This is because Dart has a
well developed http package which should be used by Dart
customers instead.
2015-08-13 21:18:31 +00:00
Misko Hevery 38945955ab refactor: Remove IQueryList
BREAKING CHANGE:

Closes #3577
2015-08-13 21:18:31 +00:00
Misko Hevery b7837389d7 refactor: Remove isDart from public API
BREAKING CHANGE:

- `IS_DARTIUM` no longer exported
2015-08-13 21:18:31 +00:00
Misko Hevery 5c328adb4b refactor(di): Visibility.(Private|Public|PublicAndPrivate)
BREAKING CHANGE:

Rename:
- `PRIVATE` => `Visibility.Private`
- `PUBLIC` => `Visibility.Public`
- `PUBLIC_AND_PRIVATE` => `Visibility.PublicAndPrivate`
2015-08-13 21:18:31 +00:00
Misko Hevery 60af19f0e1 refactor: rename all const to UPPER_CASE
Closes #3573

BREAKING CHANGE

Rename:
- `appComponentTypeToken` => `APP_COMPONENT`
- `coreDirectives` => `CORE_DIRECTIVES`
- `formDirectives` => `FORM_DIRECTIVES`
- `formInjectables` => `FORM_BINDINGS`
- `httpInjectables` => `HTTP_BINDINGS`
- `jsonpInjectables` => `JSONP_BINDINGS`
- `PROTO_CHANGE_DETECTOR_KEY` => `PROTO_CHANGE_DETECTOR`
- `appComponentRefPromiseToken` => `APP_COMPONENT_REF_PROMISE`
- `appComponentTypeToken` => `APP_COMPONENT`
- `undefinedValue` => `UNDEFINED`
- `formDirectives` => `FORM_DIRECTIVES`
- `DOCUMENT_TOKEN` => `DOCUMENT`
- `APP_ID_TOKEN` => `APP_ID`
- `MAX_IN_MEMORY_ELEMENTS_PER_TEMPLATE_TOKEN` => `MAX_IN_MEMORY_ELEMENTS_PER_TEMPLATE`
- `appBaseHrefToken` => `APP_BASE_HREF`
2015-08-13 21:18:31 +00:00
Ted Sander 1d65b38b28 feat(test): find testabilities across dart js applications
Find angular testability objects across different dart js contexts by
registering each application in a global array and interrogating each
for testabilities.

Closes #3611
2015-08-13 11:25:14 -07:00
Miško Hevery 64ebf278c0 fix: improper use package name in facade
Closes #3613
2015-08-13 05:04:00 +00:00
vsavkin 416fd085b1 refactor(pipes): removed BasePipeTrasnform
Closes #3608
2015-08-13 01:39:21 +00:00
vsavkin 839edaa15b feat(pipes): changed PipeTransform to make onDestroy optional
BREAKING CHANGE:

Before:
  Angular called onDestroy on all pipes.

After:
  Angular calls onDestroy only on pipes that have the onDestroy method.
2015-08-13 01:39:21 +00:00
Tim Blasi aa480fee72 feat(dart/transform): Support `part` directives
Allow users to split libraries using the `part` directive.

Closes #1817
2015-08-13 00:28:42 +00:00
Caitlin Potter b6ee20846b fix(benchmarks): remove reference to String.prototype.contains()
https://github.com/tc39/tc39-notes/blob/master/es6/2014-11/nov-18.md#51--44-arrayprototypecontains-and-stringprototypecontains

removed String.prototype.contains() from standard, and is not
implemented in most runtimes (SpiderMonkey still being an exception).

Closes #3570
2015-08-12 23:16:57 +00:00
Jeff Cross b5fb05b735 feat(npm): add typescript block to package.json
This makes it simple to run the `tsd link` command in a project
to automatically include paths to typings files. The definitions
also include transitive dependencies of rx.d.ts and es6-promise.d.ts.

Closes #3590

Closes #3609
2015-08-12 22:05:41 +00:00
Michael Goderbauer 8f5360c387 feat(testability): option to disable tree walking 2015-08-12 21:56:24 +00:00
Pawel Kozlowski ed25a29cc8 fix(NgClass): take initial classes into account during cleanup
Closes #3557
2015-08-12 20:08:03 +00:00
Pawel Kozlowski a7a1851c0f feat(compiler): allow binding to className using class alias
Closes #2364
2015-08-12 20:08:03 +00:00
Miško Hevery f2f4b905e5 fix(docs): ng-non-bindable
Closes #3607
2015-08-12 19:00:51 +00:00
Michael Goderbauer 08dbe87819 fix(testability): throw if no testability available
this implements the same behavior for dart that is already implemented in the typescript version
2015-08-12 10:21:32 -07:00
Pawel Kozlowski 218b037d98 test(NgClass): remove code duplication in tests 2015-08-12 10:29:37 +02:00
Rado Kirov 2150a8f9d1 feat(query): view query is properly updated when dom changes.
Fixes a bug in view manager util where sibling injector is not correctly
calculated.

ViewQuery no longer includes the view's initiating component injector.

Includes some refactoring of view methods and a removal of a polymorphic
map call.

Closes #3033

Closes #3439
2015-08-12 06:16:09 +00:00
Tobias Bosch 585ea5d600 feat(query): allow to query for `TemplateRef`
Part of #1989

Closes #3202
2015-08-12 01:51:18 +00:00
vsavkin 5b5d31fa9a feat(pipe): added the Pipe decorator and the pipe property to View
BREAKING CHANGE:
    Instead of configuring pipes via a Pipes object, now you can configure them by providing the pipes property to the View decorator.

    @Pipe({
      name: 'double'
    })
    class DoublePipe {
      transform(value, args) { return value * 2; }
    }

    @View({
      template: '{{ 10 | double}}'
      pipes: [DoublePipe]
    })
    class CustomComponent {}

Closes #3572
2015-08-12 00:38:40 +00:00
Yegor Jbanov 280d8f3148 chore: add dartdoc compliance checks to build
Closes #3582
2015-08-11 22:53:08 +00:00
Jeff Cross 5a405011de refactor(http): move http files to top-level module
Closes #2680
Closes #3417
2015-08-11 22:32:17 +00:00
Brian Ford 903a0f0513 fix(router): throw when component in route config is not defined
Close #3265

Closes #3569
2015-08-11 21:21:32 +00:00
Caitlin Potter 77d3668432 feat(http): serialize search parameters from request options
- Extends URLSearchParams API to include operations for combining
  different URLSearchParams objects:

  These new methods include:
  setAll(otherParams): performs `this.set(key, values[0])` for each
      key/value-list pair in `otherParams`

  appendAll(otherParams): performs `this.append(key, values)` for
      each key/value-list pair in `otherParams`

  replaceAll(otherParams): for each key/value-list pair in
      `otherParams`, replaces current set of values for `key` with
      a copy of the list of values.

- RequestOptions do not merge search params automatically (because
  there are multiple ways to do this). Instead, they replace any
  existing `search` field if `search` is provided. Explicit merging
  is required if merging is desirable.

- Some extra test coverage added.

Closes #2417
Closes #3020
2015-08-10 16:29:36 -07:00
Jeff Cross dfa5103b1d feat(typings): allow defining custom namespace for bundle
Allows declaring a bundle's namespace in generated typings file,
which should correspond to the global object representing the module
inside its bundle.

BREAKING CHANGE
    The router was previously exported as ng.router in the 
    angular.sfx.dev.js bundle, but now it is exported as ngRouter.

Closes #2948

Closes #3544
2015-08-10 12:59:35 -07:00
Pawel Kozlowski 6bd95c1455 feat(coreDirectives): add NgClass to coreDirectives
Closes #3534
2015-08-10 19:52:10 +00:00
Pawel Kozlowski 4f5e405676 fix(UrlResolver): encode URLs before resolving
This commits makes JS implementation to behave like Dart one.

Fixes #3543

Closes #3545
2015-08-10 19:50:10 +00:00
Ted Sander 86eb46af09 fix(transformers): be more specific in the imports to rewrite
Instead of just matching on the filename match on the full uri.

Closes #3473

Closes #3523
2015-08-10 19:07:48 +00:00
Kevin Moore 6651aab11f refactor: allow the latest dart_style version 2015-08-10 19:05:09 +00:00
Brian Ford 5a8b1bcaec docs(router): add documentation for lifecycle hooks
Closes #3334
2015-08-10 10:47:37 -07:00
Brian Ford ac6227e434 feat(router): auxiliary routes
Closes #2775
2015-08-10 10:47:37 -07:00
Matias Niemelä 24eabb9bb1 test(matchers): add support for toHaveClass in tests 2015-08-08 02:22:45 +00:00
Michael Goderbauer 574bbea747 fix(Testability): fix type error in getAllAngularTestability (dart)
This fixes the following type error that is thrown when calling getAllAngularTestability() while running Dartium in checked mode:

type 'MappedListIterable' is not a subtype of type 'List<PublicTestability>' of 'publicTestabilities'.
2015-08-07 17:35:19 -07:00
jteplitz a1c53eec6b Refactor(WebWorker): Unify WebWorker naming
Closes #3205
2015-08-07 14:43:52 -07:00
Jason Teplitz 84463cf0bd Feat(WebWorker): Add WebWorker Image Filter Demo 2015-08-07 11:25:07 -07:00
vsavkin 2dcf714d2b refactor(pipes): use Injector instead of pipe factories for pipe instantiation
BREAKING CHANGE
    - Pipe factories have been removed.
    - PIpe names to pipe implementations are 1-to-1  instead of 1-to-*

 Before:
     class DateFormatter {
         transform(date, args){}
     }

     class DateFormatterFactory {
       supporst(obj) { return true; }
       create(cdRef) { return new DateFormatter(); }
     }
     new Pipes({date: [new DateFormatterFactory()]})

After
    class DateFormatter {
      transform(date, args){}
    }
    new Pipes({date: DateFormatter})
2015-08-07 10:02:11 -07:00
vsavkin 06da60f4b7 feat(di): added resolveAndInstantiate and instantiateResolved to Injector
These two methods can be used to create objects in the context of the injector without storing them in the injector.
2015-08-07 08:29:19 -07:00
Pawel Kozlowski ff1b110ae1 fix(CSSClass): change selector to ng-class
BREAKING CHANGE:

The selector for the CSSClass directive was changed
from [class] to [ng-class]. The directive itself was
renamed from CSSClass to NgClass

Closes #3498
2015-08-07 14:56:41 +02:00
Pawel Kozlowski 748c2d6c97 fix(compiler): strip <script> tag from templates
Fixes #2766
Closes #3486
2015-08-07 11:54:33 +00:00
Pawel Kozlowski 339071cb07 refactor(CompileElement): remove unused methods
Closes #3500
2015-08-07 09:20:27 +00:00
Marc Laval a37de36fa6 fix(test_lib): run unit tests in default Documnent
Closes #3501
Fixes #3475
2015-08-07 09:57:59 +02:00
Naomi Black cf6ffd5469 docs(fix-docgen): Fix docgen issues with some recent updates to core 2015-08-06 23:17:22 -07:00
vsavkin 106a28b8dc feat(refactor): replaced ObservablePipe and PromisePipe with AsyncPipe 2015-08-07 02:10:32 +00:00
Jeremy Elbourn bd498977bd chore(material): clean up old workarounds with new features. 2015-08-06 17:54:34 -07:00
Alex Eagle 643c71740e chore(build): enable type-checking for TypeScript ES6 emit.
This requires delicate handling of type definitions which collide, because
we use TypeScript-provided lib.d.ts for --target=es5 and lib.es6.d.ts for
--target=es6.
We need to include our polyfill typings only in the --target=es5 case,
and the usages have to be consistent with lib.es6.d.ts.
Also starting with this change we now typecheck additional modules,
so this fixes a bunch of wrong typings which were never checked before.

Fixes #3178
2015-08-06 16:57:52 -07:00
Tim Blasi 40a3cd2ab1 style(dart/transform): Do not format generated code by default
Formatting code requires time and memory during the build -- do not do
it unless explicitly requested via a parameter to the transformer.

Add an entry to the
[wiki](https://github.com/angular/angular/wiki/Angular-2-Dart-Transformer)
describing the added parameter.
2015-08-06 23:32:01 +00:00
Tim Blasi 3db0ae1dac refactor(dart/transform): Show friendly messages for transform failures
Previously, the error messages coming out of the Dart transformer were
opaque when those errors came from the analyzer (for example, analyzer
parse errors). Log more useful errors when they are caught by the
transform code.
2015-08-06 22:28:10 +00:00
vsavkin 07b9be798c fix(exception_handler): log errors that are thrown by the compiler 2015-08-06 15:26:24 -07:00
Alex Eagle b4a062983b fix(dart): @proxy is a value, not a factory
Previously I added parens everywhere to make this @proxy() because our typing indicated
it was a function that returned a decorator, but this breaks dart. Instead, the typing needs
to be changed.

Fixes #3494
2015-08-06 10:02:49 -07:00
Tim Blasi f11f4e0b45 style(dart): Format with dartfmt v0.2.0
Format all pure Dart code with package:dart_style v0.2.0

Command:
```
find -type f -name "*.dart" | xargs dartformat -w
```
2015-08-05 11:04:29 -07:00
Brian Ford 450d3630cc test(router): add tests for router.d.ts
Closes #3282
2015-08-05 00:29:32 +00:00
Marc Laval 166688348a chore(browsers): fix failing tests in IE11
Closes #3388
2015-08-04 22:45:46 +02:00
Pascal Precht 39ad50657e refactor(di/tests): removes unecessary for-loop
Closes #3268
2015-08-04 20:14:04 +00:00
Martin Probst 861be30021 feat: export a proper promise type.
Promise used to be typed as any, giving incorrect results. This change
fixes places that were incorrectly typed and re-exports the actual
Promise type from es6-promise.

It also fixes a series of compilation errors discovered/triggered by
this change.
2015-08-04 19:56:02 +00:00
Tim Blasi c58b0ff787 refactor(change_detect): Share more codegen logic
Move more logic in our codegen into a shared util which is called by the
Jit & Prege change detector code.
2015-08-04 18:55:07 +00:00
vsavkin 392de4af67 feat(pipes): replaces iterable and key value diffing pipes with services
BREAKING CHANGE:
    Directives that previously injected Pipes to get iterableDiff or keyvalueDiff, now should inject IterableDiffers and KeyValueDiffers.
2015-08-04 10:39:55 -07:00
Jeremy Elbourn c20a5d65d8 fix(compiler): Allow components to use any style of selector. Fixes #1602 2015-08-04 09:34:03 -07:00
Pawel Kozlowski 4422819754 fix(parser): detect empty expression in strings to interpolate
Fixes #3412

Closes #3451
2015-08-04 08:44:14 +02:00
Pawel Kozlowski 6eaa09ac20 refactor(injector): remove unused consts
Closes #3454
2015-08-04 08:40:27 +02:00
mgechev c0adae69ac docs(Router): router config
Closes #2853
2015-08-04 02:03:26 +00:00
gdi2290 cfedc77ce1 test(XHRConnection): normalize responseText and response
normalize xhr.responseText and xhr.response

- [x] Tests

Closes #2882
2015-08-04 00:39:11 +00:00
gdi2290 96eefdfebc fix(XHRConnection): use xhr status code
closes #2841

- [x] Tests
2015-08-04 00:39:11 +00:00
Matias Niemelä 7bf7ec6d9c fix(router): ensure navigation via back button works
The router will now navigate and respect the current address value
accordingly whenever a popState event is handled.

Closes #2201
2015-08-03 22:24:57 +00:00
Matias Niemelä 60f38eab78 feat(router): add `back()` support to `MockLocationStrategy` 2015-08-03 22:24:57 +00:00
Naomi Black 209aefee57 docs(fix-docgen): Fix docgen issues with some recent updates to core 2015-08-03 14:27:02 -07:00
Ted Sander be79942ebd feat(transformers): add more information to factory debug reflection
Add the symbol information to debug_reflection_capabilities when asking
for a factory to make finding the type easier in large codebases.
2015-08-03 13:36:13 -07:00
Dima Kuzmich 1beaf81e98 docs(View): correct templateUrl and template definition
Fixes #3444
Closes #3447
2015-08-03 14:20:35 +02:00
Marc Laval 12e4c738c9 fix(collection): MapIterator.next() is not supported (Safari)
Fixes #3015
Closes #3389
2015-08-03 12:18:21 +02:00
Marc Laval 8822460858 chore(browsers): fix failing tests in Firefox
Closes #3386
2015-08-03 12:17:44 +02:00
Naomi Black 94690ec5b0 docs(link): Fix the link to an enum for ViewEncapsulation 2015-08-02 22:29:39 -07:00
Misko Hevery 77875a270d feat: implement web-tracing-framework support
This includes implementation and minimal instrumentation

Closes #2610
2015-07-31 23:04:05 +00:00
Jeremy Elbourn 6d280ea31f feat(md-button): enhance button focus appearance. 2015-07-31 14:12:25 -07:00
Yegor Jbanov 7354206c74 chore(examples): manual encoding of data: urls is no longer necessary 2015-07-31 20:46:53 +00:00
Misko Hevery 39b0286d6b fix: remove unused imports 2015-07-31 20:40:33 +00:00
Misko Hevery dad9338c82 docs(type): Export Type so that we can link to it in our docs.
Closes #3345
2015-07-31 20:40:33 +00:00
vsavkin 3437d56904 feat(core): made directives shadow native element properties
BREAKING CHANGE
    Previously, if an element had a property, Angular would update that property even if there was a directive placed on the same element with the same property. Now, the directive would have to explicitly update the native elmement by either using hostProperties or the renderer.
2015-07-31 20:29:57 +00:00
Alex Eagle 3c58878b19 chore(build): Upgrade to TypeScript@1.5.3
This change also makes us compliant with 1.6.0-dev compiler,
so we can do some experiments with apps that use 1.6 features
and compile against Angular.

We should probably add a travis build for 1.6 so we stay compatible
with both versions.
2015-07-31 20:01:27 +00:00
Jason Teplitz c5cb7009ca feat(WebWorkers): Add WebWorker Todo Example. Add support for more DOM events.
Fixed breakage caused by previous DI commit in WebWorker Todo example
2015-07-31 19:48:18 +00:00
vsavkin adc27398fd perf(change_detection): do not generate onAllChangesDone when not needed 2015-07-31 19:23:00 +00:00
Tobias Bosch dd06a871b7 fix(render): allow to configure when templates are serialized to strings
Introduces the injectable `TemplateCloner` that can be configured via the new token `MAX_IN_MEMORY_ELEMENTS_PER_TEMPLATE_TOKEN`.

Also replaces `document.adoptNode` with `document.importNode` as otherwise
custom elements are not triggered in chrome 43.

Closes #3418
Closes #3433
2015-07-31 12:04:32 -07:00
Tobias Bosch 014b6cb397 Revert "feat(WebWorkers): Add WebWorker Todo Example. Add support for more DOM events."
This reverts commit d44827a4c5.

This broke master due to a race condition in our presubmit queue.
2015-07-31 11:40:15 -07:00
Jason Teplitz d44827a4c5 feat(WebWorkers): Add WebWorker Todo Example. Add support for more DOM events. 2015-07-31 18:33:12 +00:00
vsavkin 3cda7128d0 cleanup(di): renamed viewInjector and hostInjector
BREAKING CHANGE
    Replace viewInjector with viewBindings
    Replace hostInjector with bindings
2015-07-31 09:49:51 -07:00
Pawel Kozlowski 70bc485755 fix(browser_adapter): fix clearNodes() in IE
Fixes #3295

Closes #3355
2015-07-31 14:56:31 +02:00
Pawel Kozlowski 0a40024995 test(integration): minor tests cleanup
Closes #3329
2015-07-31 10:52:42 +02:00
vsavkin 985627bd65 cleanup(DI): clean up visibility decorators
BREAKING CHANGE:
    Replace @Ancestor() with @Host() @SkipSelf()
    Replace @Unbounded() wwith @SkipSelf()
    Replace @Ancestor({self:true}) with @Host()
    Replace @Unbounded({self:true}) with nothing
    Replace new AncestorMetadata() with [new HostMetadata(), new SkipSelfMetadata()]
    Replace new UnboundedMetadata() with new SkipSelfMetadata()
    Replace new Ancestor({self:true}) with new HostMetadata()
2015-07-31 02:30:26 +00:00
vsavkin a9ec6b9064 docs(di): added a doc describing advanced di topis 2015-07-31 01:57:17 +00:00
vsavkin f5864afdbb docs(di): updated di docs 2015-07-31 01:57:17 +00:00
Jeremy Elbourn 21e2f3c1db chore(button): dramatically clean-up button css. 2015-07-31 01:34:17 +00:00
Hank Duan 7b94bbf3e4 feat(testability): Expose function getAllAngularTestabilities 2015-07-31 01:23:55 +00:00
vsavkin 71ea19902a perf(change_detection): removed the currentProto property 2015-07-31 00:31:11 +00:00
Tim Blasi 9e7363f686 refactor(benchmarks): Remove unnecessary style setter
Remove `style` setter that is no longer used / necessary.

Closes #3375
2015-07-31 00:29:02 +00:00
Pawel Kozlowski 2768158eaf tests(ProtoViewBuilder): host properties binding to unknown props
When binding a host property, we shouldn't try to bind to any
directive properties that might exist on a host element

Closes #3383
2015-07-30 16:16:35 -07:00
Misko Hevery d4ded1a60d fix(docs): add ViewDefinition, DirectiveMetadata to public API
Closes #3346
2015-07-30 22:02:30 +00:00
Jeff Cross 4e76cac5b7 fix(core): export LifeCycle at top-level modules
LifeCycle can now be imported via angular2/angular2 or
angular2/core, so that end users can inject it without
having to use the full source path.

Closes #3395
2015-07-30 21:52:29 +00:00
Tobias Bosch 0dbdd5cd3c refactor(render): don’t store DOM nodes but store strings for big ProtoViews.
Also inserts comment nodes before/after projected nodes so that text nodes don’t get merged when we serialize/deserialize them.

Closes #3356
First part of #3364
2015-07-30 14:11:13 -07:00
yjbanov 4893002408 chore(transfomer): code style in rewriter 2015-07-30 12:06:53 -07:00
Yegor Jbanov 29095766e6 fix(bootstrap): fix expressions containing bootstrap (fixes #3309) 2015-07-30 12:06:53 -07:00
Jason Teplitz eee2146735 fix(testing): Fixed race condition in WebWorker and Routing tests 2015-07-30 18:54:12 +00:00
Naomi Black 5c21af95c7 chore(docs): fix bad link syntax for ViewEncapsulation enums 2015-07-30 10:55:13 -07:00
Tim Blasi 68a581a04c fix(dart/transform): Remove malfunctioning zone error handler
Remove `onError` zone callback which is consuming exceptions thrown by
the `Transformer`s and can cause `pub` to become unresponsive.

Closes #3368
2015-07-30 00:07:19 +00:00
Jason Teplitz 7b834e02ec feat(WebWorkers) Add DOM event support
closes #3046
2015-07-29 23:34:43 +00:00
Rado Kirov 34acef58e7 fix(query): view query should not be updated when subviews are attached. 2015-07-29 22:33:15 +00:00
vsavkin c1ee943533 perf(change_detection): do not check intermediate results 2015-07-29 21:58:29 +00:00
Jeremy Elbourn f7d7789915 fix(decorators): stop directives inheriting parent class decorators.
Fixes #2291
2015-07-29 21:23:31 +00:00
Tim Blasi 9c19eb906b refactor(change_detect): Move (de)hydrate methods into superclass
Move the implementation of `(de)hydrate`, `hydrated`, and
`detectChangesInRecords` into `AbstractChangeDetector`.

Add comments clarifying the contract between `AbstractChangeDetector`
and its subclasses.

Closes #3245
2015-07-29 13:12:53 -07:00
yjbanov 73b7d99dc4 fix(style_url_resolver): fix data: url resolution 2015-07-29 11:24:17 -07:00
Tim Blasi 192cf9ddf5 refactor(change_detect): Move common fields to AbstractChangeDetector
Move fields common to Dynamic, Jit, and Pregen change detectors into the
`AbstractChangeDetector` superclass to save on codegen size and reduce
code duplication.

Update to #3248, closes #3243
2015-07-29 10:46:49 -07:00
Pawel Kozlowski d894aa9101 feat(compiler): introduce schema for elements
Closes #3353
2015-07-29 19:40:46 +02:00
Pawel Kozlowski aae5a4cece refactor(ElementBinderBuilder): remove unused code
Closes #3326
2015-07-29 07:56:30 -07:00
Tobias Bosch 16e3d7e96e refactor(shadow_dom): remove `ShadowDomStrategy` in favor of `@View(encapsulation)`
BREAKING CHANGES:
- `ShadowDomStrategy` was removed. To specify the encapsulation of a component use `@View(encapsulation: ViewEncapsulation.NONE | ViewEncapsulation.EMULATED | ViewEncapsulation.NATIVE)`
- The default encapsulation strategy is now `ViewEncapsulation.EMULATED` if a component contains styles and `ViewEncapsulation.NONE` if it does not. Before this was always `NONE`.
- `ViewLoader` now returns the template as a string and the styles as a separate array
2015-07-28 22:33:11 -07:00
Matias Niemelä 4cfe92c47a example(routing): adding routing example and e2e tests 2015-07-28 15:31:17 -07:00
Jacob MacDonald 2faa89852b fix(transformer): Fix generation of `annotations` argument when registering functions. 2015-07-28 15:26:33 -07:00
Tim Blasi d84993faf1 refactor(change_detect): Move (de)hydrate logic into dedicated methods
Call new `(de)hydrateDirectives` methods from `(de)hydrate`. Add a null
implementation in `AbstractChangeDetector` and only override if
necessary for the specific change detector.

Update to #3248
2015-07-28 15:10:06 -07:00
Tim Blasi a9efc48e71 refactor(change_detect): Create & use `looseNotIdentical`
Create `looseNotIdentical => !looseIdentical`, which will save a lot of
unnecessary '!' characters in generated change detectors.

Update to https://github.com/angular/angular/issues/3248
2015-07-28 14:59:31 -07:00
vsavkin 8543c347a8 feat(core): provide an error context when an exception happens in an error handler 2015-07-28 14:22:15 -07:00
Rado Kirov 1d4502944c fix(query): the view should not be visible to @Query.
@ViewQuery is the correct way to query the view template.
2015-07-28 14:16:14 -07:00
Naomi Black 448ca384cc docs(chore): de-link Type because there's no doc for dgeni to find 2015-07-28 13:48:03 -07:00
Tim Blasi 2c9951273a style(dart): Run dartfmt v0.1.8+2 on all pure Dart code
Update formatting for all pure Dart code in the repo.
2015-07-28 12:44:03 -07:00
gdi2290 6fac901151 feat(http): call complete on request complete
closes #2635
2015-07-28 11:45:15 -07:00
Peter Bacon Darwin 74b311a472 revert: style(ngFor): add whitespace to `Directive` annotation
Reverted from commit 35597a8349

This style change makes the docs look nicer but clang-format doesn't
like it. @mhevery perhaps we can tweak the clang-format rules for this?
2015-07-28 14:14:44 +01:00
Peter Bacon Darwin 35597a8349 style(ngFor): add whitespace to `Directive` annotation 2015-07-28 11:29:57 +01:00
Tim Blasi 03fc7fe8c2 refactor(change_detect): Make `ChangeDetectionUtil#uninitialized` a var
Previously, `uninitialized()` was a method, requiring a call as well as
two extra characters everywhere it was used.

Make this value a variable, saving the characters and avoiding the
method call to get its value.

This change also removes the export of `uninitialized` from
change_detect.ts, which is technically a breaking change, however
`uninitialized` is an implementation detail and nobody should be using
it in app logic. By convention, apps should not be importing from files
under `src/`.

Update to #3248.
2015-07-27 17:14:09 -07:00
gdi2290 8a91d71625 feat(http.ts): export BrowserXHR
needed for replacing BrowserXHR bindings with mock/server version  etc

Closes #2641
2015-07-27 16:34:34 -07:00
gdi2290 4dc6d748a9 fix(lowercase,uppercase): make stateless pipes
same problem as `json` previously of transforming only on reference
check

Closes #3173
Closes #3189
2015-07-27 16:28:48 -07:00
Adil MOURAHI 99587a9907 docs: Update 02_directives.md
Closes #3191
2015-07-27 16:27:00 -07:00
Marc Laval eebd736cfe feat(build): initial SauceLabs setup
Closes #2347
2015-07-27 16:15:28 -07:00
Nathan Walker 05c4fb2fac docs(typo): ngzone referencing misspelled api
Closes #3292
2015-07-27 16:09:05 -07:00
Marc Fisher 448264be39 fix(core): fix type error in setElementProperty
Convert propertyValue to string when calling setElementAttribute.

Closes #3279
2015-07-27 16:05:10 -07:00
vsavkin 71bb4b3ee5 feat(change_detection): generate checkNoChanges only in dev mode 2015-07-27 15:50:19 -07:00
Misko Hevery a2bb81c406 Revert "fix(url_resolver): in Dart make package urls relative to AppRootUrl"
This reverts commit 469afda53e.
2015-07-27 14:15:02 -07:00
Jason Teplitz 7cbaf1076f refactor(Async): Unify TS and Dart PromiseCompleter naming
Also add explicit typing wherever we use PromiseCompleter
2015-07-27 10:28:07 -07:00
Pawel Kozlowski a8b57256c8 fix(class): allow class names with mixed case
Fixes #3001

BREAKING CHANGE:

View renderer used to take normalized CSS class names (ex. fooBar for foo-bar).
With this change a rendered implementation gets a calss name as specified in a
template, without any transformations / normalization. This change only affects
custom view renderers that should be updated accordingly.

Closes #3264
2015-07-27 16:46:42 +02:00
Misko Hevery 329a6e00dc chore(API): cleaned up top level imports (render) 2015-07-25 03:20:15 +00:00
Misko Hevery c83a3f3372 chore(docs): added more docs for core.ts 2015-07-25 03:20:12 +00:00
Tim Blasi 0906ee8a4e refactor(change_detect): Abstract name logic into NameRegistry
Create `NameRegistry`, responsible for understanding how names are
generated for change detector fields and variables.

Use `NameRegistry` for both JS Jit & Dart pre-generated detectors.
Making progress on #3248
2015-07-24 18:58:09 -07:00
Tim Blasi 23cd385f20 fix(dart/transform): Handle mixed lifecycle specs
Update the transformer to handle classes which both have a `lifecycle`
value and `implement` lifecycle interfaces.

Closes #3276
2015-07-24 18:02:04 -07:00
vsavkin 45b10a1f0f cleanup(forms): value accessors inject NgControl only from self 2015-07-24 16:56:22 -07:00
yjbanov 469afda53e fix(url_resolver): in Dart make package urls relative to AppRootUrl 2015-07-24 16:37:01 -07:00
vsavkin c2bbda02a1 feat(change_detection): provide error context for change detection errors 2015-07-24 15:45:26 -07:00
vsavkin e744409cb9 feat(exception_handler): print originalException and originalStack for all exceptions 2015-07-24 15:45:26 -07:00
Pawel Kozlowski 0a8b3816f7 style(lexer): idiomatic TypeScript
Closes #3228
2015-07-24 15:40:32 -07:00
Pascal Precht bc21aa0124 refactor(di/injector): fixes typo in InjectorStrategy interface
Closes #3269
2015-07-24 15:36:27 -07:00
Rado Kirov 2577f5eebf test(query): adds a test for query in the presense of projection.
Query uses only the logical structure of the application, so it is not
affected by projection, which only the rendering structure.

Closes #3278
2015-07-24 15:30:57 -07:00
Jacob MacDonald f575ba60fb fix(transformer): Don't throw on annotations that don't match a descriptor.
Closes #3280
2015-07-24 15:29:14 -07:00
Jacob MacDonald 5b5de6662f chore(transformer): Use class for reflection info instead of a map
closes https://github.com/angular/angular/issues/906
2015-07-24 13:12:57 -07:00
Hank Duan a8b75c3d41 feat(testability): hook zone into whenstable api with async support
closes(#428)
2015-07-24 12:46:12 -07:00
Alex Eagle 19d8b221b4 fix(typings): test our .d.ts with --noImplicitAny
This matches how DefinitelyTyped tests it, so we are
one step closer to publishing the same file we generate.

See #3195
2015-07-24 11:24:44 -07:00
Pawel Kozlowski 345fa521dd fix(change_detection): convert interpolated null values to empty strings
Fixes #3007

Closes #3271
2015-07-24 18:05:06 +02:00
Pawel Kozlowski 16493e9769 refactor(integration_test): remove unused imports 2015-07-24 18:05:06 +02:00
Peter Bacon Darwin dbbb7385f5 docs(annotations): remove reference to `Parent` annotation
This annotation was removed in 6f4a39c337
2015-07-23 19:21:28 -07:00
Naomi Black 3a7c9e4c62 docs(links): change bad links for Type RenderViewRef RenderFragmentRef, onEventDoneFn, and Renderer api. 2015-07-23 19:21:28 -07:00
Yegor 408618b836 feat(url_resolver): support package: urls (fixes #2991) 2015-07-23 18:35:05 -07:00
Jason Teplitz 771c0170d9 feat(web-workers) Add WebWorker Renderer
Allows angular apps to be rendered from the webworker!
Closes #3052, #3053, and #3097
2015-07-23 18:29:10 -07:00
Tobias Bosch 1438922ffb fix(class): correctly clean up on destroy
Fixes #3249
Closes #3256
2015-07-23 17:13:33 -07:00
Sigmund Cherem fd46b49ea6 feat(transformers): directive aliases in Dart transformers (fix #1747) 2015-07-23 15:25:32 -07:00
Tobias Bosch 46502e4d61 fix(projection): allow more bound render elements than app elements.
Fixes #3236
Closes #3247
2015-07-23 15:05:46 -07:00
Tobias Bosch b44b06c2c9 fix(projection): allow to project to a non text node
We already had a test for this, but too low level that it did not catch this null value in `hasNativeShadowRoot`

Fixes #3230
Closes #3241
2015-07-23 14:29:15 -07:00
Tobias Bosch 5ec67ee2a7 fix(compiler): prevent race conditions
Previously, the compiler would detect cycles where there were none just because of other components that were compiled in parallel. Furthermore, the way ProtoView merging was triggered could result into early exits resulting in errors when trying to instantiate ProtoViews.

Fixes #3206
Closes #3211
2015-07-23 14:28:38 -07:00
vsavkin 03c8e7428f fix(element_injector): do not throw when cannot find element when trying to report an error 2015-07-23 11:22:04 -07:00
vsavkin 70792c744d refactor(exception_handler): unified all exception handling
BREAKING CHANGE
    Previously it was possible to pass a custom error reporter to bootstrap, which was used only during the construction of Injector. This had limited utility, so this capability has been removed.
2015-07-23 11:22:04 -07:00
vsavkin fdf226ab69 feat(exception_handler): change ExceptionHandler to output context 2015-07-23 11:22:04 -07:00
Jacob MacDonald bd65b63c65 fix(transformer): Loggers now are per zone and each transform runs in its own zone 2015-07-23 09:36:04 -07:00
Jacob MacDonald 09226cdd75 chore(dart logging): Only print relevant messages in debug mode. 2015-07-23 07:32:30 -07:00
yjbanov 3531bb7118 feat(bootstrap): remove the need for explicit reflection setup in bootstrap code
BREAKING CHANGES:

Dart applications and TypeScript applications meant to transpile to Dart must now
import `package:angular2/bootstrap.dart` instead of `package:angular2/angular2.dart`
in their bootstrap code. `package:angular2/angular2.dart` no longer export the
bootstrap function. The transformer rewrites imports of `bootstrap.dart` and calls
to `bootstrap` to `bootstrap_static.dart` and `bootstrapStatic` respectively.
2015-07-22 17:02:32 -07:00
Matias Niemelä fdffcaba9b feat(router): use querystring params for top-level routes
Closes #3017
2015-07-22 14:40:55 -07:00
vsavkin a9e7c90960 cleanup: removed an invalid export 2015-07-22 14:22:50 -07:00
vsavkin 5a86f85936 feat(di): added context to runtime DI errors 2015-07-22 14:22:46 -07:00
vsavkin 8ecb632d70 feat(lang): added "context" to BaseException 2015-07-22 14:21:44 -07:00
Tim Blasi 8ad4ad57d1 feat(dart/transform): Populate `lifecycle` from lifecycle interfaces
When a `Directive` implements a lifecycle interface (e.g. `OnChange` or
`OnInit`), populate its `lifecycle` property if not already populated).

Closes #3181
2015-07-22 11:34:29 -07:00
Tobias Bosch 854b5b7da8 feat(benchmark): add static_tree benchmark
Static binary component tree of depth 10, i.e. 1024 components.

Current numbers for `pureScriptTime` are:

JavaScript:

Baseline: 27.10+-9%
Ng2: 26.84+-8%
Ng1: 55.30+-14%

Dart:

Baseline: 30.13+-4%
Ng2: 45.94+-3%
Ng1: 128.88+-10%

I.e. in JS we are same speed as baseline right now!

Some background: We had a recent change in the compiler that merges components into their parents already during compilation (#2529). This made Ng2 2x faster in this benchmark (before the Ng2 JS time was 49.59+-14%ms).

Closes #3196
2015-07-22 10:58:50 -07:00
Alex Eagle 51e6f33d32 chore(build): Make PRs 15m faster.
Don't precompile Dart2JS for pull requests, instead serve the dart
sources with pub serve. We were already testing with Dartium so
all we lose is some test coverage of defects exposed only by the
Dart2JS transpiler.
This still runs the dart transformer.

Fixes #3030
2015-07-21 22:14:38 -07:00
Matias Niemelä 476988876c test(router): refactor integration tests to use TestComponentBuilder
Closes #3182
2015-07-21 20:40:42 -07:00
vsavkin 6f4a39c337 refactor(di): removed @Parent
BREAKING CHANGE
    The @Parent annotation has been removed. Use @Ancestor instead.
    @Parent was used to enforce a particular DOM structure (e.g., a pane component is a direct child of the tabs component).
    DI is not the right mechanism to do it. We should enforce it using schema instead.
2015-07-21 14:39:28 -07:00
Tobias Bosch a472eacc07 fix(content_projection): allow to project text nodes to a place without bindings
Fixes #3163
Closes #3179
2015-07-21 14:18:35 -07:00
Tobias Bosch 078475a082 refactor(compiler): speed up proto view merging
- Don't create intermediate merge results
- Only merge embedded ProtoViews that contain `<ng-content>` tags

Closes #3150
Closes #3177
2015-07-21 13:39:41 -07:00
Alex Eagle de18da2a0d feat(build): require parameter types
Fixes #2833
2015-07-21 06:20:13 -07:00
Tim Blasi b2a0be87e8 fix(change_detect): Sort `DirectiveMetadata` properties during processing
The Angular 2 render compiler can get out of sync between its transformer
execution and its runtime execution, leading to incorrect change detectors with
out-of-order property values. Stable sorting solves this problem (temporarily).
2015-07-20 17:08:02 -07:00
vsavkin 4c8ea12903 feat(pipes): changed .append to .extend
BREAKING CHANGE:
    Pipes.append has been renamed into Pipes.extend.
    Pipes.extend prepends pipe factories instead of appending them.
2015-07-20 15:36:42 -07:00
Alex Rickabaugh e94270946a feat(compiler): Support $baseUrl in HTML attributes when loading a template.
Angular fetches template HTML files outside of the browser's normal parsing flow. As a result, URLs in template files are interpreted relative to the root application, when the components defined by the template files are inserted into the DOM. This change enables a template author to prefix URLs with the string $baseUrl, which will be replaced with the relative base path of the template file.

So for an example template loaded from /component/foo/template.html:

<img src="$baseUrl/logo.png" />

becomes:

<img src="/component/foo/logo.png" />

Addresses #2384.
2015-07-20 15:26:00 -07:00
Tim Blasi 40d21b808d refactor(dart/transform): Remove chatty formatter message
Remove informational formatter message that is very chatty and not
actually useful.
2015-07-20 15:24:23 -07:00
Tim Blasi 095def3845 refactor(dart/transform): Add warning about issue #1747
Add a more descriptive warning about the lack of support for `Directive`
dependency aliases and a pointer to more information.
2015-07-20 14:11:17 -07:00
Tobias Bosch 153660fe7b perf(dom): Only send values for existing properties to js interior
Due to #3019 we have to check whether a property exists on a DOM element
not before runtime of the application.

Previously, we did this check in JavaScript, making all property values
go through dart js interop. However, this is slow for complex objects.

This commit changes this behavior to first check whether the property exists
before sending the property value to the DOM element via js interop.

Closes #3149
2015-07-20 13:43:10 -07:00
Kevin Moore 3dd05ef7db feat: FunctionWithParamTokens.execute now returns the value of the function
Closes https://github.com/angular/angular/issues/3131
2015-07-20 09:03:00 -07:00
Kevin Moore cfc18b5a6f refactor: remove direct import of unittest from test_lib 2015-07-20 09:01:12 -07:00
vsavkin 57496926ca fix(di): fixed dynamic component loading of components created in child injector 2015-07-17 16:18:19 -07:00
Tim Blasi 19e4ee81b9 style(change_detect): Minor readability updates 2015-07-17 15:24:10 -07:00
Tim Blasi f74d97e1f1 feat(forms): Export NgSelectOption directive
Make the `NgSelectOption` directive visible from top-level forms module.
2015-07-17 15:24:10 -07:00
Brian Ford 011fab37af fix(router): improve error for missing base href
Closes #3096
2015-07-17 14:00:04 -07:00
Brian Ford 8296dcec09 fix(facade): use base element to get base href
Previously, calls to getBaseHref used document.baseURI, which defaults
to the current path in the absence of a base element in the document.
This leads to surprising behavior.

With this change, getBaseHref returns null when a base element is not
present in the document.
2015-07-17 14:00:04 -07:00
Ted Sander 3df8363a94 chore(transformers): cleanup unneeded _toDepsUri function
Cleanu unneeded _toDepsUri function in favor of the common toDepsExtension.
2015-07-17 13:10:12 -07:00
Ted Sander 5cc84ed4bb feat(transformers): implement initializing deferred libraries
Implement deferred libraries to work with dependency injection and other
angular codegen. This is done by not initializing the library in the parent
ng_deps file when it is declared as deferred, rewriting the import and,
chaining a future that initializes the library in any files that are using
deferred libraries which need angular codegen.
2015-07-17 13:07:31 -07:00
vsavkin 2f08ed8d3e fix(di): fixed types 2015-07-17 13:04:34 -07:00
Kevin Moore 1386977a34 chore: cleanup to pubspec.yaml files
Depend on the released version of Dart 1.10
Sort dependencies per convention
2015-07-17 12:34:06 -07:00
Kevin Moore cdb6c9cda2 chore: support any version of pkg/observe >= 0.13.1
Closes https://github.com/angular/angular/issues/3117
2015-07-17 12:34:06 -07:00
vsavkin 13b1d85058 refactor(forms): removed iterableToList 2015-07-17 10:52:23 -07:00
Brian Ford c6409cb624 fix(router): throw when reserved characters used in route definition
Closes #3021
2015-07-17 10:51:23 -07:00
Mohamed Hegazy 573c047d50 chore(build): Fix .d.ts generation errors caused by invisible types of exported declarations
Fixes #3098
2015-07-17 10:43:21 -07:00
Tobias Bosch f42382db3b refactor(views): split `ViewManager/ViewContainerRef.createView` into 2 methods
BREAKING CHANGES:

`ViewManager.createView` / `ViewContainerRef.create` have been split into 2 methods:

- `createHostView` which takes dynamically created bindings
- `createEmbeddedView` which takes the newly introduced `TemplateRef`

The new type `TemplateRef` is the combination of a `ProtoViewRef` and and `ElementRef`
from the same place. Use `TemplateRef` when working with embedded views in
`ng-if`, `ng-for`, ... instead of `ProtoViewRef`.

Also, `ProtoViewRef` is no more injectable, but `TemplateRef` is.

First part of #1989 to clean up manual content projection.
Closes #3114
2015-07-17 10:40:32 -07:00
Ted Sander 762a94f2cd fix(transformers): fix sort order for reflective imports
Fix sort order for reflective imports in reflection_remover/rewriter.dart.
Currently there is only one import so the sort order happens to be correct,
but if another one is added the rewrite code will break.
2015-07-17 10:38:44 -07:00
vsavkin 5b597de18c fix(forms): default the initial value of Control to null 2015-07-16 18:34:03 -07:00
Brian Ford 4d28167bc0 feat(router): add interfaces for route definitions in RouteConfig
Closes #2261
2015-07-16 16:36:22 -07:00
Tobias Bosch 61c73576c8 fix(renderer): handle empty fragments correctly
Closes #3100
2015-07-16 16:18:58 -07:00
Tobias Bosch 116b64de25 fix(view_manager): allow to create host views even if there is an embedded view at the same place. 2015-07-16 16:18:43 -07:00
Pawel Kozlowski b785503543 refactor(ProtoViewBuilder): improve error message for dangling bindings
Closes #3066
2015-07-16 16:16:49 -07:00
Pawel Kozlowski fc8f4688c7 docs(Title): add documentation for the Title service
Closes #3063
2015-07-16 16:11:35 -07:00
vsavkin 2147ce45c2 fix(di): do not rely on the fact that types are canonicalized 2015-07-16 15:19:18 -07:00
Ted Sander c701664e07 chore(transformers): remove reflector parameter from initReflector signature
Remove reflector parameter from initReflector method to simplify ng_deps for reflection
initialization. It wasn't used and was added for testability, but wasn't used. This
keeps the interface simplier.
2015-07-16 14:11:27 -07:00
Yegor a4915ad634 fix(api_docs): slightly more accurate description of Dart overrideOnEventDone 2015-07-16 14:03:27 -07:00
Yegor fe3a55966d fix(api_docs): slightly more accurate description of TS overrideOnEventDone 2015-07-16 14:02:39 -07:00
Tim Blasi f1e8176995 fix(change_detect): Handle '$' in change detector strings
In Dart, '$' indicates the beginning of an interpolation.
- Escapes '$' in strings when generating change detector classes.
- Adds a unit test to cover this case.
2015-07-16 13:01:53 -07:00
Tobias Bosch 5654f2f4e2 test(dom_renderer): test that properties on the root element can be changed.
Closes #3013
Closes #3085
2015-07-16 10:39:32 -07:00
vsavkin b1231593b6 fix(forms): do not reset the value of the input when it came from the view 2015-07-16 10:00:32 -07:00
Tobias Bosch b1df54501a feat(compiler): attach components and project light dom during compilation.
Closes #2529

BREAKING CHANGES:
- shadow dom emulation no longer
  supports the `<content>` tag. Use the new `<ng-content>` instead
  (works with all shadow dom strategies).
- removed `DomRenderer.setViewRootNodes` and `AppViewManager.getComponentView`
  -> use `DomRenderer.getNativeElementSync(elementRef)` and change shadow dom directly
- the `Renderer` interface has changed:
  * `createView` now also has to support sub views
  * the notion of a container has been removed. Instead, the renderer has
    to implement methods to attach views next to elements or other views.
  * a RenderView now contains multiple RenderFragments. Fragments
    are used to move DOM nodes around.

Internal changes / design changes:
- Introduce notion of view fragments on render side
- DomProtoViews and DomViews on render side are merged,
  AppProtoViews are not merged, AppViews are partially merged
  (they share arrays with the other merged AppViews but we keep
  individual AppView instances for now).
- DomProtoViews always have a `<template>` element as root
  * needed for storing subviews
  * we have less chunks of DOM to clone now
- remove fake ElementBinder / Bound element for root text bindings
  and model them explicitly. This removes a lot of special cases we had!
- AppView shares data with nested component views
- some methods in AppViewManager (create, hydrate, dehydrate) are iterative now
  * now possible as we have all child AppViews / ElementRefs already in an array!
2015-07-15 20:23:27 -07:00
vsavkin d449ea5ca4 feat(change_detection): added support for ObservableList from package:observe 2015-07-15 17:06:42 -07:00
vsavkin 583c5ffcb5 fix(ng_for): fixed ng_for to pass a change detector ref to the pipe registry 2015-07-15 17:06:42 -07:00
vsavkin 7879761a41 fix(element_injector): inject the containing change detector ref to directives 2015-07-15 17:06:42 -07:00
Rado Kirov f7dfd2325d chore(query): refactor QueryList and BaseQueryList.
Closes #3035, #3016
2015-07-15 15:49:52 -07:00
Sigmund Cherem b03560b670 fix(examples): add a couple entrypoints, adjust pubspec, fix change detector bug in Dart 2015-07-15 15:41:40 -07:00
Jeff Cross 903ff9047f feat(core): add ability to reflect DOM properties as attributes
By binding the token `DOM_REFLECT_PROPERTIES_AS_ATTRIBUTES` provided by 
the dom_renderer module to `true` in the root injector (i.e. bootstrap()), 
all elements whose properties are set by angular will be reflected as 
attributes with the prefix "ng-reflect-".

Fixes #2910
2015-07-15 13:59:44 -07:00
Alex Eagle 66ec4d1f5c fix(build): clang-format 2015-07-15 13:20:38 -07:00
Alex Eagle 93055f78ea chore(lint): require semicolons
Relying on ASI (automatic semicolon insertion)
is allowed in TypeScript because JavaScript allows
it. However, when we run clang-format it doesn’t
understand that these statements are terminated
with a newline and changes the indentation, in bad
cases even breaking the code.

Fixes #817
2015-07-15 12:57:32 -07:00
Jason Teplitz 33500e986b feat(webworkers) Add MessageBus, Broker, and Serializer 2015-07-15 11:49:10 -07:00
Brian Ford b26f99787e chore(router): fix formatting 2015-07-15 11:10:39 -07:00
Brian Ford 8bdca5c03e fix(router): improve error messages for routes with no config
Closes #2323
2015-07-15 10:28:25 -07:00
Brian Ford ccb41632c7 feat(facade): add getTypeNameForDebugging function 2015-07-15 10:28:25 -07:00
Alfonso Presa cd532b00d4 test(e2e): fix error setting style property of DOM element
Fixes the following error in e2e tests: "Cannot set property style of
\#<HTMLElement> which has only a getter".

Closes #2874
2015-07-15 11:37:25 +02:00
Caitlin Potter 81abc39929 feat(http): add support for JSONP requests
Closes #2905
Closes #2818
2015-07-14 21:31:05 -04:00
yjbanov b4cde697b5 chore(facade): make normalizeBlank less nonsensical 2015-07-14 17:21:54 -07:00
vsavkin 7531b48d02 fix(di): instatiate services lazily 2015-07-14 17:10:30 -07:00
Ted Sander 2bc1217409 feat(transformers): expose DI transformer for use by packages
Expose the DI transformer for packages that have injectable objects but do not
contain the application or angular views.

Closes #2814
2015-07-14 16:59:03 -07:00
Misko Hevery b73ba68215 refactor(LifecycleEvent): change from onInit to Lifecycle.onInit
BREAKING CHANGE

Closes #2928
2015-07-14 16:51:44 -07:00
Caitlin Potter e1e7912ab2 chore(benchmarks): use `isSupported()` rather than `!isJsObject()`
Seems more accurate, and would allow `isJsObject()` to handle typical
`{}`-literals in dart, which could be useful

Closes #2995
2015-07-14 16:46:25 -07:00
Jacob MacDonald e988f59c08 fix(html_adapter): Implement hasAttribute and getAttribute.
Fixes the template compiler when running on the server.
2015-07-14 14:48:00 -07:00
Victor Berchet 7dc1dff816 refactor(NgZone): idiomatic Dart 2015-07-14 09:17:15 +02:00
Matias Niemelä 5677bf73ca feat(router): introduce matrix params
Closes #2774
Closes #2989
2015-07-13 17:15:13 -07:00
Brian Ford 97ef1c27df fix(router): export lifecycle hooks in bundle 2015-07-13 17:03:42 -07:00
vsavkin 04baa46efe fix(di): removed default visibility
BREAKING CHANGE:
    Directives will use the Unbounded visibility by default, whereas before the change they used Self
2015-07-13 16:00:07 -07:00
Jacob MacDonald 4bdc91892a chore(transformer): add a test that generated change detectors dont call notifyOnBinding for template variables 2015-07-13 15:09:06 -07:00
Tobias Bosch b3a763a718 fix(compiler): keep `DOM.hasProperty` in sync between browser and transformer.
Right now, we always return true until
we have property schema support (#2014).

Fixes #2984
Closes #2981
2015-07-13 15:09:06 -07:00
Rado Kirov 7ee6963f5d feat(query): initial implementation of view query.
ViewQuery is a new API that allows a component to query its view.

Closes #1935
2015-07-13 14:44:55 -07:00
Jacob MacDonald cf103de4a7 fix(transformer): Event getters now use property name not event name 2015-07-13 10:42:09 -07:00
Brian Ford a9a552c112 feat(router): lifecycle hooks
Closes #2640
2015-07-13 09:12:15 -07:00
Richard Sentino bdfef4ed16 docs(util/decorators): fix typos in ClassDefinition interface
Closes #3000
2015-07-13 09:08:12 +02:00
Martin Probst 3bf8c18c56 chore: run clang-format on code base.
This fixes several minor indentation issues (instanceof precendence,
type declaration specificity, template string length calculation).

This should also fix some flip-flop situations with template strings.
2015-07-12 18:50:52 +02:00
Peter Bacon Darwin 2e4a2a0e5a chore(doc-gen): remove unnecessary `@public` and `@exportedAs` tags 2015-07-11 07:21:46 +01:00
yjbanov 0e28297e68 feat(zone): add "on event done" zone hook 2015-07-10 15:45:52 -07:00
Jeff Cross 1eebceab27 feat(pipes): add static append method to Pipes
This change allows creation of a new Pipes binding with new pipes appended
to pipes of an inherited Pipes instance.

Closes #2901
2015-07-10 15:42:57 -07:00
Jeff Cross 9a70f84e60 refactor(pipes): rename PipeRegistry to Pipes
BREAKING CHANGE:
    This change renames all instances of PipeRegistry to Pipes.
    As part of this change, the former "defaultPipes" export is
    now a Pipes instance, instead of a map. The map that was previously
    called "defaultPipes" no longer exists, but may be accessed via
    defaultPipes.config.
2015-07-10 15:42:56 -07:00
Jeff Cross 8b3efdf229 chore(pipes): rename pipe_registry.ts -> pipes.ts
This is its own commit so that tools have an easier time of preserving
history of the file, by keeping the diff between pipes.ts and
pipe_registry.ts minimal.

Also moved pipe_registry_spec.ts
2015-07-10 15:42:56 -07:00
Sigmund Cherem 1427d73b66 fix(example): add missing todo 2015-07-10 15:21:03 -07:00
Sigmund Cherem 62589293aa fix(transformer): fix 'pub build' in examples 2015-07-10 15:08:48 -07:00
Rado Kirov 749d043258 fix(css_shim): fixes multiple uses of polyfill-unscoped-rule. 2015-07-10 12:40:57 -07:00
vsavkin a6210466c7 fix(di): do not use exceptions to detect if reflection is enabled 2015-07-10 10:50:03 -07:00
Julie Ralph 71c65b47f9 feat(test): add test bundle
Create a bundle for the test library, TestComponentBuilder,
TestInjector, and DebugElement.

Internal tests use a superset of the bundle.
2015-07-09 18:07:48 -07:00
vsavkin 0ed5dd0d7b fix(di): hostInjector and viewInjector support nested arrays 2015-07-09 15:03:38 -07:00
Pouria Alimirzaei b716046b97 feat(pipes): add date pipe
Closes #2877
2015-07-09 15:00:14 -07:00
Pouria Alimirzaei 3143d188ae feat(pipes): add number (decimal, percent, currency) pipes 2015-07-09 14:59:57 -07:00
vsavkin b54e7214f0 chore: removed angular2.api.ts
BREACKING CHANGE:

We export InjectMetadata instead of InjectAnnotation
2015-07-09 13:54:07 -07:00
Matias Niemelä d6dadc6efc fix(router): fix broken `HashLocationStrategy` string issue for dart 2015-07-09 13:21:17 -07:00
Victor Berchet 447926dc08 refactor(RegExp): use /.../ to create RegExp literal
fixes #2691
2015-07-09 09:14:25 +02:00
Matias Niemelä 258da88765 revert: example(routing): adding routing example and e2e tests
This reverts commit 718fa35167.
2015-07-08 23:03:29 -07:00
Alex Eagle e79dd6aa2d fix(build) clang-format 2015-07-08 18:34:39 -07:00
Matias Niemelä 2c37cc5fcb chore(examples): fix dart issues with router example 2015-07-08 18:01:32 -07:00
Matias Niemelä ae5cd51f50 chore(examples): fix broken router example code for Dart 2015-07-08 16:43:28 -07:00
Alex Eagle df877a7d5b fix(build): clang-format 2015-07-08 16:30:43 -07:00
Pawel Kozlowski 6596c72131 docs(NgStyle): add documentation
Closes #2931
2015-07-08 16:11:19 -07:00
Pawel Kozlowski f827e1532e docs(CSSClass): add documentation
Closes #2933
2015-07-08 16:09:24 -07:00
Pawel Kozlowski bab271fcb4 test(CssClass): verify that classes from string exp are cleared properly
Closes #2888
Closes #2934
2015-07-08 16:08:32 -07:00
Alfonso Presa 0792f1a7a1 fix(tsconfig): target should be lower case
closes #2938
2015-07-08 16:07:25 -07:00
Bob Nystrom ac50ffca5e fix(transform): handle multiple interfaces in directive processor
Comma separate the list of interfaces in the directive transformer.

Closes #2941
2015-07-08 16:05:42 -07:00
Matias Niemelä caa252e57b chore(router): change `substr` to `substring` 2015-07-08 15:46:51 -07:00
Matias Niemelä 718fa35167 example(routing): adding routing example and e2e tests
Closes #2650
2015-07-08 15:14:46 -07:00
Matias Niemelä c177d889a2 fix(router): ensure that page refresh with hash URLs works
This patch fixes the `HashLocationStrategy` to always return a string
path value without a hash symbol as the starting value.

Closes #2920
2015-07-08 15:08:17 -07:00
vsavkin 3f7ebde037 feat(forms): changed all form directives to have basic control attributes 2015-07-08 12:04:38 -07:00
vsavkin 4656c6f5cf tools: added experimentalDecorators flag to tsconfig 2015-07-08 10:46:03 -07:00
cexbrayat e0fb50cc3c docs(view_ref): fix typos
Closes #2930
2015-07-08 18:06:40 +02:00
cexbrayat 7d9f5d7538 docs(element_ref): fix typos 2015-07-08 18:06:39 +02:00
Pawel Kozlowski 2ac8ebd3ef refactor(directive_parser): improve code readability
Closes #2876
2015-07-08 18:02:08 +02:00
Misko Hevery 871267d578 chore(.d.ts): remove private Compiler deps
Closes #2929
2015-07-08 08:07:08 +02:00
Misko Hevery c33e3be735 chore(.d.ts): remove *Args files 2015-07-07 20:04:14 -07:00
Misko Hevery 3ab8a0c438 chore(docs): adding docs to core.ts and annotations.ts 2015-07-07 20:04:13 -07:00
Misko Hevery 12a427e158 fix(.d.ts): correct ComponentAnnotation inheritance
Closes #2356
2015-07-07 20:04:13 -07:00
Misko Hevery 0052c6b120 chore: improve angular2.d.ts file
- support ambient and import format for .d.ts
2015-07-07 20:04:13 -07:00
Misko Hevery 65a767d9b0 refactor: export angular as ‘ng’ in SFX 2015-07-07 20:04:13 -07:00
gdi2290 e5405e4ba2 fix(forms): Remove cyclic dependency
correctly resolve Renderer by removing cyclic dependencies

Closes #2856
2015-07-07 16:25:43 -07:00
Melinda Sarnicki Bernardo b60d714acf docs: Corrects article to 'a' instead of 'an' in comment
Closes #2858
2015-07-07 16:24:23 -07:00
Alfonso Presa edf5053bf0 feat(NgStyle): Export NgStyle in angular2/directives
Closes #2878
2015-07-07 16:20:24 -07:00
Eric Lee Carraway 3869818d8f docs(modules): fix typos
closes #2914
2015-07-07 16:14:43 -07:00
Brian Ford 286a249a9a feat(router): support deep-linking to siblings
Closes #2807
2015-07-07 14:54:59 -07:00
Brian Ford d828664d0c fix(router): allow generating links with numeric params 2015-07-07 14:54:59 -07:00
Jacob MacDonald 9e1158de4f fix(transformer): Support prefixed annotations in the transformer.
closes https://github.com/angular/angular/issues/2754
2015-07-07 11:26:42 -07:00
vsavkin 569766fa8b refactor(di): added support for custom dep providers 2015-07-07 08:27:54 -07:00
vsavkin c2efa23e94 fix(change_detection): throw ChangeDetectionError in JIT mode 2015-07-06 18:03:50 -07:00
vsavkin d2774421e8 fix(change_detection): do not coalesce records with different directive indices 2015-07-06 17:59:38 -07:00
Alex Eagle 8681f79182 chore(typings): move comments to decorator args.
The properties of the annotation classes are not really the public API.
Users will interact with these via a decorator, and the decorator
takes a single arg, typed with the args class. Thus the comment is
more useful on the arg class.

This also fixes the problem of intellisense/autocomplete not showing
the important docs as you fill in the properties in a decorator
declaration.
2015-07-06 17:25:59 -07:00
Alex Eagle b10d7a2e51 fix(angular2.d.ts): show typing for Component, etc
We had the same symbol exported as the interface
for Component decorator as well as the class for
Component annotation, and dgeni only showed the
latter.
Rename the interfaces for decorators with an ‘I’
prefix so they are retained in the .d.ts output.
2015-07-06 17:25:59 -07:00
Alex Eagle a56d33d7ca feat(typings): mark void methods in angular2.d.ts
Previously, when a return type was missing it
could have been any. But following #2746 we
require return types so remaining untyped returns
must be void.
2015-07-06 17:25:59 -07:00
Jacob MacDonald 2b45bd2a63 fix(transformer): Put paramater data in the same order as the reflected version.
Previously it would be [@Inject(#thing), Thing], but it should be [Thing, @Inject(#thing)].
2015-07-06 15:48:00 -07:00
Jacob MacDonald 7986e7ce7e feat(transformer): Support @Injectable() on static functions 2015-07-06 15:47:54 -07:00
Jacob MacDonald 311b47720b fix(transformer): Fix string interpolation for bindings.
Previously it did not stringify properties and used `+` instead of ` `.
2015-07-06 14:57:21 -07:00
Pawel Kozlowski 582551bea9 test(ProtoViewBuilder): correct duplicate tests
Closes #2860
2015-07-06 22:40:49 +02:00
Itay Radotzki 883b506445 fix(Http): add support for headers 2015-07-06 10:06:12 -07:00
Igor Minar 1c94c32f4d fix(router): child routers should delegate navigation to the root router
There is an e2e tests in the examples/routing app testing this behavior
2015-07-02 23:21:33 -07:00
Igor Minar d5ace7a562 test(route_link): add missing unit tests 2015-07-02 23:21:33 -07:00
Igor Minar 2ed251a5db docs(router): fix doc 2015-07-02 23:21:05 -07:00
Pawel Kozlowski cd65fc2a5e fix(compiler): detect and strip data- prefix from bindings
Fixes #2687

Closes #2719
2015-07-02 17:32:12 +02:00
vsavkin d1393b0581 fix(di): injecting null causes a cyclic dependency 2015-07-01 17:08:45 -07:00
vsavkin 3a8e1661fa examples: added an example of a crud app 2015-07-01 16:25:53 -07:00
Pawel Kozlowski 0598226e24 fix(compiler): don't trigger duplicated directives
Fixes #2756
Closes #2568
2015-07-01 16:13:26 -07:00
Pouria Alimirzaei 0b50258814 feat(pipes): add limitTo pipe 2015-07-01 13:36:01 -07:00
Pouria Alimirzaei 600d53c68e feat(pipes): support arguments in transform function 2015-07-01 13:36:01 -07:00
vsavkin f0e962c55e feat(di): removed app injector
BREAKING CHANGE:

THe appInjector property has been removed. Instead use viewInjector or hostInjector.
2015-07-01 13:33:43 -07:00
Jacob MacDonald 73a939e76c fix(change detectors): Fix deduping of protos in transformed dart mode.
In non-transformed mode the funcOrValue check was enough, but once
transformed these all use the same function for getters, so we need
to also check the name.
2015-07-01 12:56:31 -07:00
Ted Sander dcdd73065a feat(transformers): provide a flag to disable inlining views
Add a flag to allow a user to disable inlining css/html content into the views.

Closes #2658
2015-07-01 11:39:16 -07:00