Commit Graph

1404 Commits

Author SHA1 Message Date
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
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