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
6d13cf9b8f
refactor(core): move more modules into core
2015-09-05 07:01:34 +00:00
841aa1af5b
fix(annotation_matcher): fix typo with Directive matchers
2015-09-05 07:01:34 +00:00
2d4f331c63
chore: update ts2dart version
2015-09-05 07:01:34 +00:00
86bda288bd
fix(DirectiveResolver): Synced with latest changes
...
Closes #3928
2015-09-05 01:02:33 +00:00
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
ef88e0f804
refactor(transformers): extract lifecycle hooks from the interfaces
2015-09-05 01:02:33 +00:00
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
67b9414268
fix(benchpress): make benchpress fit for chrome 45
...
Closes #3411
Closes #3982
2015-09-05 01:01:13 +00:00
d8c5ab232c
refactor: add leading underscore to private fields
...
Closes #4001
2015-09-05 00:54:50 +00:00
c320240086
chore(benchmarks): enable transformer on the benchmarks
...
Closes #3960
2015-09-05 00:25:51 +00:00
15164a8e6c
fix(reflector): merge prop metadata from getters and setters
...
Closes #4006
2015-09-04 23:44:22 +00:00
4ec4dcabe9
feat(docs): document change detection profiler
2015-09-04 16:38:53 -07:00
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
b025f94351
chore(build): Remove traceur from build.
...
This removes traceur from the compilation step in broccoli. Broccoli now
transpiles to es5 using the typescript compiler.
2015-09-04 23:10:34 +00:00
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
855cb16cc7
refactor(event_manager): use multi bindings to configure EventManager
...
Closes #3978
2015-09-04 21:57:36 +00:00
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
9d42b52d2c
chore(doc-gen): add spaces when removing linebreaks for Jade _data.json files
...
Closes #3623
Closes #3997
2015-09-04 21:39:15 +00:00
34b91c62c5
chore(doc-gen): convert private classes to interfaces in the docs
...
Closes #3576
2015-09-04 21:39:15 +00:00
4bffd97edd
chore(doc-gen): move the "private class" converter into a helper service
...
This will allow it to be reused in other doc gen configurations
2015-09-04 21:39:15 +00:00
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
2384082b5c
feat(compiler): add stylesheet compiler
...
Part of #3605
Closes #3891
2015-09-04 19:22:43 +00:00
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
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
337ce21149
docs(util): fix typos
...
Closes #3988
2015-09-04 15:35:29 +00:00
d78261695b
fix(dts generation): add support for type aliases
...
Closes #3952
2015-09-03 23:52:10 +00:00
ad3b9cf232
fix(dts generation): rewrite the d.ts file code generator to fix bugs and apply type remap correctly
...
Previously the type remap was not being applied to comments and free floating functions.
The nunjucks template was becoming unreadable so rather than making a tweak there I
rewrote it into imperative code that is much easier to follow.
The output was diffed against the old output. The diff contained only the expected changes.
2015-09-03 23:52:10 +00:00
34deda594f
fix(test_lib): add missing types
2015-09-03 23:52:10 +00:00
f6108c54ec
fix(build): add config for outputting the missing test_lib.d.ts file
2015-09-03 23:52:10 +00:00
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
ddde7117a7
fix(fake_async): remove unused variable
2015-09-03 23:52:10 +00:00
44c303aad2
refactor(collection.ts): simplify ListWrapper.clear implementation
2015-09-03 23:52:10 +00:00
53d0861372
style(di): fix a variable name typo
2015-09-03 23:52:09 +00:00
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
3ff321475d
cleanup(di): fix dart analyzer errors
...
Closes #3962
2015-09-03 15:18:18 +00:00
d43bd9b4ca
refactor(forms): update example apps to use the new way of registering validators
2015-09-03 15:18:18 +00:00
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
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
2fea0c2602
feat(compiler): allow to create ChangeDetectors from parsed templates
...
Part of #3605
Closes #3950
2015-09-02 23:20:14 +00:00
5c9613e084
test(query): add a test for view query with var bindings
...
Closes #3920
Closes #3946
2015-09-02 20:26:59 +00:00
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
44a991e245
refactor(test_lib): do not execute jasmine test as async if not required
...
fixes #3893
2015-09-01 17:49:24 -07:00
46f751bd2f
feat(docs): document unused reflection info tracking
2015-09-01 16:59:19 -07:00
358908e605
feat(WebWorker): Expose MessageBroker API
...
Closes #3942
2015-09-01 23:53:54 +00:00
6532171997
feat(docs): document code size management tools for Dart
2015-09-01 16:18:34 -07:00
b9cf945b30
chore(di): do not double export DI
2015-09-01 13:28:15 -07:00
5b8ce1e42a
chore(http.d.ts): have http properly reexport core types
2015-09-01 13:28:15 -07:00
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
42e1b07705
fix(build): delete unreferenced typings on npm install
...
fixes #1636
Closes #3940
2015-09-01 17:37:56 +00:00