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
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
f3da37c92f
fix(WebWorker): Add zone support to MessageBus
...
Closes #4053
2015-09-08 14:03:58 -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
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
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
Harry Terkelsen
d8c5ab232c
refactor: add leading underscore to private fields
...
Closes #4001
2015-09-05 00:54:50 +00:00
vsavkin
15164a8e6c
fix(reflector): merge prop metadata from getters and setters
...
Closes #4006
2015-09-04 23:44:22 +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
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
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
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
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
Victor Berchet
ecf6ba3974
refactor: prefer const over var for constants
...
Closes #3818
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
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
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
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
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
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
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
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
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
Marc Laval
65344fcac9
chore(build): add IE9 to CI
...
Closes #3747
2015-08-21 15:46:26 +00:00