946 Commits

Author SHA1 Message Date
vsavkin
5e6317fecc feat(change_detection): request a change detection check when an event happens
Closes #3679
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
Michael Goderbauer
841206c678 fix(testability): properly throw when no testability available 2015-08-15 19:44:58 -07:00
gdi2290
35a83b495a feat(query_list): delegate toString to _results array
Closes #3004
2015-08-14 03:42:11 +00:00
vsavkin
da4bcd5d91 docs: removed outdated docs
Closes #3581
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
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
Michael Goderbauer
8f5360c387 feat(testability): option to disable tree walking 2015-08-12 21:56:24 +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
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
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
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
Naomi Black
cf6ffd5469 docs(fix-docgen): Fix docgen issues with some recent updates to core 2015-08-06 23:17:22 -07:00
vsavkin
07b9be798c fix(exception_handler): log errors that are thrown by the compiler 2015-08-06 15:26:24 -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
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
Naomi Black
209aefee57 docs(fix-docgen): Fix docgen issues with some recent updates to core 2015-08-03 14:27:02 -07:00
Dima Kuzmich
1beaf81e98 docs(View): correct templateUrl and template definition
Fixes #3444
Closes #3447
2015-08-03 14:20:35 +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
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
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
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
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
Hank Duan
7b94bbf3e4 feat(testability): Expose function getAllAngularTestabilities 2015-07-31 01:23:55 +00:00
Yegor Jbanov
29095766e6 fix(bootstrap): fix expressions containing bootstrap (fixes #3309) 2015-07-30 12:06:53 -07:00
Naomi Black
5c21af95c7 chore(docs): fix bad link syntax for ViewEncapsulation enums 2015-07-30 10:55:13 -07:00
Rado Kirov
34acef58e7 fix(query): view query should not be updated when subviews are attached. 2015-07-29 22:33:15 +00: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
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
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
Nathan Walker
05c4fb2fac docs(typo): ngzone referencing misspelled api
Closes #3292
2015-07-27 16:09:05 -07:00
vsavkin
71bb4b3ee5 feat(change_detection): generate checkNoChanges only in dev mode 2015-07-27 15:50:19 -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
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
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