Commit Graph

1536 Commits

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