vsavkin
f5864afdbb
docs(di): updated di docs
2015-07-31 01:57:17 +00:00
Hank Duan
7b94bbf3e4
feat(testability): Expose function getAllAngularTestabilities
2015-07-31 01:23:55 +00:00
vsavkin
71ea19902a
perf(change_detection): removed the currentProto property
2015-07-31 00:31:11 +00:00
Pawel Kozlowski
2768158eaf
tests(ProtoViewBuilder): host properties binding to unknown props
...
When binding a host property, we shouldn't try to bind to any
directive properties that might exist on a host element
Closes #3383
2015-07-30 16:16:35 -07:00
Misko Hevery
d4ded1a60d
fix(docs): add ViewDefinition, DirectiveMetadata to public API
...
Closes #3346
2015-07-30 22:02:30 +00:00
Jeff Cross
4e76cac5b7
fix(core): export LifeCycle at top-level modules
...
LifeCycle can now be imported via angular2/angular2 or
angular2/core, so that end users can inject it without
having to use the full source path.
Closes #3395
2015-07-30 21:52:29 +00:00
Tobias Bosch
0dbdd5cd3c
refactor(render): don’t store DOM nodes but store strings for big ProtoViews.
...
Also inserts comment nodes before/after projected nodes so that text nodes don’t get merged when we serialize/deserialize them.
Closes #3356
First part of #3364
2015-07-30 14:11:13 -07:00
yjbanov
4893002408
chore(transfomer): code style in rewriter
2015-07-30 12:06:53 -07: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
Tim Blasi
68a581a04c
fix(dart/transform): Remove malfunctioning zone error handler
...
Remove `onError` zone callback which is consuming exceptions thrown by
the `Transformer`s and can cause `pub` to become unresponsive.
Closes #3368
2015-07-30 00:07:19 +00:00
Jason Teplitz
7b834e02ec
feat(WebWorkers) Add DOM event support
...
closes #3046
2015-07-29 23:34:43 +00:00
Rado Kirov
34acef58e7
fix(query): view query should not be updated when subviews are attached.
2015-07-29 22:33:15 +00:00
vsavkin
c1ee943533
perf(change_detection): do not check intermediate results
2015-07-29 21:58:29 +00:00
Jeremy Elbourn
f7d7789915
fix(decorators): stop directives inheriting parent class decorators.
...
Fixes #2291
2015-07-29 21:23:31 +00:00
Tim Blasi
9c19eb906b
refactor(change_detect): Move (de)hydrate methods into superclass
...
Move the implementation of `(de)hydrate`, `hydrated`, and
`detectChangesInRecords` into `AbstractChangeDetector`.
Add comments clarifying the contract between `AbstractChangeDetector`
and its subclasses.
Closes #3245
2015-07-29 13:12:53 -07:00
yjbanov
73b7d99dc4
fix(style_url_resolver): fix data: url resolution
2015-07-29 11:24:17 -07: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
Pawel Kozlowski
aae5a4cece
refactor(ElementBinderBuilder): remove unused code
...
Closes #3326
2015-07-29 07:56:30 -07: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
Jacob MacDonald
2faa89852b
fix(transformer): Fix generation of `annotations` argument when registering functions.
2015-07-28 15:26:33 -07:00
Tim Blasi
d84993faf1
refactor(change_detect): Move (de)hydrate logic into dedicated methods
...
Call new `(de)hydrateDirectives` methods from `(de)hydrate`. Add a null
implementation in `AbstractChangeDetector` and only override if
necessary for the specific change detector.
Update to #3248
2015-07-28 15:10:06 -07:00
Tim Blasi
a9efc48e71
refactor(change_detect): Create & use `looseNotIdentical`
...
Create `looseNotIdentical => !looseIdentical`, which will save a lot of
unnecessary '!' characters in generated change detectors.
Update to https://github.com/angular/angular/issues/3248
2015-07-28 14:59:31 -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
gdi2290
6fac901151
feat(http): call complete on request complete
...
closes #2635
2015-07-28 11:45:15 -07:00
Peter Bacon Darwin
74b311a472
revert: style(ngFor): add whitespace to `Directive` annotation
...
Reverted from commit 35597a8349
This style change makes the docs look nicer but clang-format doesn't
like it. @mhevery perhaps we can tweak the clang-format rules for this?
2015-07-28 14:14:44 +01:00
Peter Bacon Darwin
35597a8349
style(ngFor): add whitespace to `Directive` annotation
2015-07-28 11:29:57 +01:00
Tim Blasi
03fc7fe8c2
refactor(change_detect): Make `ChangeDetectionUtil#uninitialized` a var
...
Previously, `uninitialized()` was a method, requiring a call as well as
two extra characters everywhere it was used.
Make this value a variable, saving the characters and avoiding the
method call to get its value.
This change also removes the export of `uninitialized` from
change_detect.ts, which is technically a breaking change, however
`uninitialized` is an implementation detail and nobody should be using
it in app logic. By convention, apps should not be importing from files
under `src/`.
Update to #3248 .
2015-07-27 17:14:09 -07:00
gdi2290
8a91d71625
feat(http.ts): export BrowserXHR
...
needed for replacing BrowserXHR bindings with mock/server version etc
Closes #2641
2015-07-27 16:34:34 -07:00
gdi2290
4dc6d748a9
fix(lowercase,uppercase): make stateless pipes
...
same problem as `json` previously of transforming only on reference
check
Closes #3173
Closes #3189
2015-07-27 16:28:48 -07:00
Adil MOURAHI
99587a9907
docs: Update 02_directives.md
...
Closes #3191
2015-07-27 16:27:00 -07:00
Marc Laval
eebd736cfe
feat(build): initial SauceLabs setup
...
Closes #2347
2015-07-27 16:15:28 -07:00
Nathan Walker
05c4fb2fac
docs(typo): ngzone referencing misspelled api
...
Closes #3292
2015-07-27 16:09:05 -07:00
Marc Fisher
448264be39
fix(core): fix type error in setElementProperty
...
Convert propertyValue to string when calling setElementAttribute.
Closes #3279
2015-07-27 16:05:10 -07:00
vsavkin
71bb4b3ee5
feat(change_detection): generate checkNoChanges only in dev mode
2015-07-27 15:50:19 -07:00
Misko Hevery
a2bb81c406
Revert "fix(url_resolver): in Dart make package urls relative to AppRootUrl"
...
This reverts commit 469afda53e
.
2015-07-27 14:15:02 -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
Pawel Kozlowski
a8b57256c8
fix(class): allow class names with mixed case
...
Fixes #3001
BREAKING CHANGE:
View renderer used to take normalized CSS class names (ex. fooBar for foo-bar).
With this change a rendered implementation gets a calss name as specified in a
template, without any transformations / normalization. This change only affects
custom view renderers that should be updated accordingly.
Closes #3264
2015-07-27 16:46:42 +02: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
Tim Blasi
0906ee8a4e
refactor(change_detect): Abstract name logic into NameRegistry
...
Create `NameRegistry`, responsible for understanding how names are
generated for change detector fields and variables.
Use `NameRegistry` for both JS Jit & Dart pre-generated detectors.
Making progress on #3248
2015-07-24 18:58:09 -07:00
Tim Blasi
23cd385f20
fix(dart/transform): Handle mixed lifecycle specs
...
Update the transformer to handle classes which both have a `lifecycle`
value and `implement` lifecycle interfaces.
Closes #3276
2015-07-24 18:02:04 -07:00
vsavkin
45b10a1f0f
cleanup(forms): value accessors inject NgControl only from self
2015-07-24 16:56:22 -07:00
yjbanov
469afda53e
fix(url_resolver): in Dart make package urls relative to AppRootUrl
2015-07-24 16:37:01 -07: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
Pawel Kozlowski
0a8b3816f7
style(lexer): idiomatic TypeScript
...
Closes #3228
2015-07-24 15:40:32 -07:00
Pascal Precht
bc21aa0124
refactor(di/injector): fixes typo in InjectorStrategy interface
...
Closes #3269
2015-07-24 15:36:27 -07:00
Rado Kirov
2577f5eebf
test(query): adds a test for query in the presense of projection.
...
Query uses only the logical structure of the application, so it is not
affected by projection, which only the rendering structure.
Closes #3278
2015-07-24 15:30:57 -07:00
Jacob MacDonald
f575ba60fb
fix(transformer): Don't throw on annotations that don't match a descriptor.
...
Closes #3280
2015-07-24 15:29:14 -07:00
Jacob MacDonald
5b5de6662f
chore(transformer): Use class for reflection info instead of a map
...
closes https://github.com/angular/angular/issues/906
2015-07-24 13:12:57 -07:00
Hank Duan
a8b75c3d41
feat(testability): hook zone into whenstable api with async support
...
closes(#428 )
2015-07-24 12:46:12 -07:00
Alex Eagle
19d8b221b4
fix(typings): test our .d.ts with --noImplicitAny
...
This matches how DefinitelyTyped tests it, so we are
one step closer to publishing the same file we generate.
See #3195
2015-07-24 11:24:44 -07:00
Pawel Kozlowski
345fa521dd
fix(change_detection): convert interpolated null values to empty strings
...
Fixes #3007
Closes #3271
2015-07-24 18:05:06 +02:00
Pawel Kozlowski
16493e9769
refactor(integration_test): remove unused imports
2015-07-24 18:05:06 +02:00
Peter Bacon Darwin
dbbb7385f5
docs(annotations): remove reference to `Parent` annotation
...
This annotation was removed in 6f4a39c337
2015-07-23 19:21:28 -07:00
Naomi Black
3a7c9e4c62
docs(links): change bad links for Type RenderViewRef RenderFragmentRef, onEventDoneFn, and Renderer api.
2015-07-23 19:21:28 -07:00
Yegor
408618b836
feat(url_resolver): support package: urls ( fixes #2991 )
2015-07-23 18:35:05 -07:00
Jason Teplitz
771c0170d9
feat(web-workers) Add WebWorker Renderer
...
Allows angular apps to be rendered from the webworker!
Closes #3052 , #3053 , and #3097
2015-07-23 18:29:10 -07:00
Tobias Bosch
1438922ffb
fix(class): correctly clean up on destroy
...
Fixes #3249
Closes #3256
2015-07-23 17:13:33 -07:00
Sigmund Cherem
fd46b49ea6
feat(transformers): directive aliases in Dart transformers ( fix #1747 )
2015-07-23 15:25:32 -07:00
Tobias Bosch
46502e4d61
fix(projection): allow more bound render elements than app elements.
...
Fixes #3236
Closes #3247
2015-07-23 15:05:46 -07:00
Tobias Bosch
b44b06c2c9
fix(projection): allow to project to a non text node
...
We already had a test for this, but too low level that it did not catch this null value in `hasNativeShadowRoot`
Fixes #3230
Closes #3241
2015-07-23 14:29:15 -07:00
Tobias Bosch
5ec67ee2a7
fix(compiler): prevent race conditions
...
Previously, the compiler would detect cycles where there were none just because of other components that were compiled in parallel. Furthermore, the way ProtoView merging was triggered could result into early exits resulting in errors when trying to instantiate ProtoViews.
Fixes #3206
Closes #3211
2015-07-23 14:28:38 -07:00
vsavkin
03c8e7428f
fix(element_injector): do not throw when cannot find element when trying to report an error
2015-07-23 11:22:04 -07:00
vsavkin
70792c744d
refactor(exception_handler): unified all exception handling
...
BREAKING CHANGE
Previously it was possible to pass a custom error reporter to bootstrap, which was used only during the construction of Injector. This had limited utility, so this capability has been removed.
2015-07-23 11:22:04 -07:00
vsavkin
fdf226ab69
feat(exception_handler): change ExceptionHandler to output context
2015-07-23 11:22:04 -07:00
Jacob MacDonald
bd65b63c65
fix(transformer): Loggers now are per zone and each transform runs in its own zone
2015-07-23 09:36:04 -07:00
Jacob MacDonald
09226cdd75
chore(dart logging): Only print relevant messages in debug mode.
2015-07-23 07:32:30 -07:00
yjbanov
3531bb7118
feat(bootstrap): remove the need for explicit reflection setup in bootstrap code
...
BREAKING CHANGES:
Dart applications and TypeScript applications meant to transpile to Dart must now
import `package:angular2/bootstrap.dart` instead of `package:angular2/angular2.dart`
in their bootstrap code. `package:angular2/angular2.dart` no longer export the
bootstrap function. The transformer rewrites imports of `bootstrap.dart` and calls
to `bootstrap` to `bootstrap_static.dart` and `bootstrapStatic` respectively.
2015-07-22 17:02:32 -07:00
Matias Niemelä
fdffcaba9b
feat(router): use querystring params for top-level routes
...
Closes #3017
2015-07-22 14:40:55 -07:00
vsavkin
a9e7c90960
cleanup: removed an invalid export
2015-07-22 14:22:50 -07:00
vsavkin
5a86f85936
feat(di): added context to runtime DI errors
2015-07-22 14:22:46 -07:00
vsavkin
8ecb632d70
feat(lang): added "context" to BaseException
2015-07-22 14:21:44 -07:00
Tim Blasi
8ad4ad57d1
feat(dart/transform): Populate `lifecycle` from lifecycle interfaces
...
When a `Directive` implements a lifecycle interface (e.g. `OnChange` or
`OnInit`), populate its `lifecycle` property if not already populated).
Closes #3181
2015-07-22 11:34:29 -07:00
Matias Niemelä
476988876c
test(router): refactor integration tests to use TestComponentBuilder
...
Closes #3182
2015-07-21 20:40:42 -07:00
vsavkin
6f4a39c337
refactor(di): removed @Parent
...
BREAKING CHANGE
The @Parent annotation has been removed. Use @Ancestor instead.
@Parent was used to enforce a particular DOM structure (e.g., a pane component is a direct child of the tabs component).
DI is not the right mechanism to do it. We should enforce it using schema instead.
2015-07-21 14:39:28 -07:00
Tobias Bosch
a472eacc07
fix(content_projection): allow to project text nodes to a place without bindings
...
Fixes #3163
Closes #3179
2015-07-21 14:18:35 -07:00
Tobias Bosch
078475a082
refactor(compiler): speed up proto view merging
...
- Don't create intermediate merge results
- Only merge embedded ProtoViews that contain `<ng-content>` tags
Closes #3150
Closes #3177
2015-07-21 13:39:41 -07:00
Alex Eagle
de18da2a0d
feat(build): require parameter types
...
Fixes #2833
2015-07-21 06:20:13 -07:00
Tim Blasi
b2a0be87e8
fix(change_detect): Sort `DirectiveMetadata` properties during processing
...
The Angular 2 render compiler can get out of sync between its transformer
execution and its runtime execution, leading to incorrect change detectors with
out-of-order property values. Stable sorting solves this problem (temporarily).
2015-07-20 17:08:02 -07:00
vsavkin
4c8ea12903
feat(pipes): changed .append to .extend
...
BREAKING CHANGE:
Pipes.append has been renamed into Pipes.extend.
Pipes.extend prepends pipe factories instead of appending them.
2015-07-20 15:36:42 -07:00
Alex Rickabaugh
e94270946a
feat(compiler): Support $baseUrl in HTML attributes when loading a template.
...
Angular fetches template HTML files outside of the browser's normal parsing flow. As a result, URLs in template files are interpreted relative to the root application, when the components defined by the template files are inserted into the DOM. This change enables a template author to prefix URLs with the string $baseUrl, which will be replaced with the relative base path of the template file.
So for an example template loaded from /component/foo/template.html:
<img src="$baseUrl/logo.png" />
becomes:
<img src="/component/foo/logo.png" />
Addresses #2384 .
2015-07-20 15:26:00 -07:00
Tim Blasi
40d21b808d
refactor(dart/transform): Remove chatty formatter message
...
Remove informational formatter message that is very chatty and not
actually useful.
2015-07-20 15:24:23 -07:00
Tim Blasi
095def3845
refactor(dart/transform): Add warning about issue #1747
...
Add a more descriptive warning about the lack of support for `Directive`
dependency aliases and a pointer to more information.
2015-07-20 14:11:17 -07:00
Tobias Bosch
153660fe7b
perf(dom): Only send values for existing properties to js interior
...
Due to #3019 we have to check whether a property exists on a DOM element
not before runtime of the application.
Previously, we did this check in JavaScript, making all property values
go through dart js interop. However, this is slow for complex objects.
This commit changes this behavior to first check whether the property exists
before sending the property value to the DOM element via js interop.
Closes #3149
2015-07-20 13:43:10 -07:00
Kevin Moore
3dd05ef7db
feat: FunctionWithParamTokens.execute now returns the value of the function
...
Closes https://github.com/angular/angular/issues/3131
2015-07-20 09:03:00 -07:00
Kevin Moore
cfc18b5a6f
refactor: remove direct import of unittest from test_lib
2015-07-20 09:01:12 -07:00
vsavkin
57496926ca
fix(di): fixed dynamic component loading of components created in child injector
2015-07-17 16:18:19 -07:00
Tim Blasi
19e4ee81b9
style(change_detect): Minor readability updates
2015-07-17 15:24:10 -07:00
Tim Blasi
f74d97e1f1
feat(forms): Export NgSelectOption directive
...
Make the `NgSelectOption` directive visible from top-level forms module.
2015-07-17 15:24:10 -07:00
Brian Ford
011fab37af
fix(router): improve error for missing base href
...
Closes #3096
2015-07-17 14:00:04 -07:00
Brian Ford
8296dcec09
fix(facade): use base element to get base href
...
Previously, calls to getBaseHref used document.baseURI, which defaults
to the current path in the absence of a base element in the document.
This leads to surprising behavior.
With this change, getBaseHref returns null when a base element is not
present in the document.
2015-07-17 14:00:04 -07:00
Ted Sander
3df8363a94
chore(transformers): cleanup unneeded _toDepsUri function
...
Cleanu unneeded _toDepsUri function in favor of the common toDepsExtension.
2015-07-17 13:10:12 -07:00
Ted Sander
5cc84ed4bb
feat(transformers): implement initializing deferred libraries
...
Implement deferred libraries to work with dependency injection and other
angular codegen. This is done by not initializing the library in the parent
ng_deps file when it is declared as deferred, rewriting the import and,
chaining a future that initializes the library in any files that are using
deferred libraries which need angular codegen.
2015-07-17 13:07:31 -07:00
vsavkin
2f08ed8d3e
fix(di): fixed types
2015-07-17 13:04:34 -07:00
Kevin Moore
1386977a34
chore: cleanup to pubspec.yaml files
...
Depend on the released version of Dart 1.10
Sort dependencies per convention
2015-07-17 12:34:06 -07:00
Kevin Moore
cdb6c9cda2
chore: support any version of pkg/observe >= 0.13.1
...
Closes https://github.com/angular/angular/issues/3117
2015-07-17 12:34:06 -07:00
vsavkin
13b1d85058
refactor(forms): removed iterableToList
2015-07-17 10:52:23 -07:00
Brian Ford
c6409cb624
fix(router): throw when reserved characters used in route definition
...
Closes #3021
2015-07-17 10:51:23 -07:00
Mohamed Hegazy
573c047d50
chore(build): Fix .d.ts generation errors caused by invisible types of exported declarations
...
Fixes #3098
2015-07-17 10:43:21 -07:00
Tobias Bosch
f42382db3b
refactor(views): split `ViewManager/ViewContainerRef.createView` into 2 methods
...
BREAKING CHANGES:
`ViewManager.createView` / `ViewContainerRef.create` have been split into 2 methods:
- `createHostView` which takes dynamically created bindings
- `createEmbeddedView` which takes the newly introduced `TemplateRef`
The new type `TemplateRef` is the combination of a `ProtoViewRef` and and `ElementRef`
from the same place. Use `TemplateRef` when working with embedded views in
`ng-if`, `ng-for`, ... instead of `ProtoViewRef`.
Also, `ProtoViewRef` is no more injectable, but `TemplateRef` is.
First part of #1989 to clean up manual content projection.
Closes #3114
2015-07-17 10:40:32 -07:00
Ted Sander
762a94f2cd
fix(transformers): fix sort order for reflective imports
...
Fix sort order for reflective imports in reflection_remover/rewriter.dart.
Currently there is only one import so the sort order happens to be correct,
but if another one is added the rewrite code will break.
2015-07-17 10:38:44 -07:00
vsavkin
5b597de18c
fix(forms): default the initial value of Control to null
2015-07-16 18:34:03 -07:00
Brian Ford
4d28167bc0
feat(router): add interfaces for route definitions in RouteConfig
...
Closes #2261
2015-07-16 16:36:22 -07:00
Tobias Bosch
61c73576c8
fix(renderer): handle empty fragments correctly
...
Closes #3100
2015-07-16 16:18:58 -07:00
Tobias Bosch
116b64de25
fix(view_manager): allow to create host views even if there is an embedded view at the same place.
2015-07-16 16:18:43 -07:00
Pawel Kozlowski
b785503543
refactor(ProtoViewBuilder): improve error message for dangling bindings
...
Closes #3066
2015-07-16 16:16:49 -07:00
Pawel Kozlowski
fc8f4688c7
docs(Title): add documentation for the Title service
...
Closes #3063
2015-07-16 16:11:35 -07:00
vsavkin
2147ce45c2
fix(di): do not rely on the fact that types are canonicalized
2015-07-16 15:19:18 -07:00
Ted Sander
c701664e07
chore(transformers): remove reflector parameter from initReflector signature
...
Remove reflector parameter from initReflector method to simplify ng_deps for reflection
initialization. It wasn't used and was added for testability, but wasn't used. This
keeps the interface simplier.
2015-07-16 14:11:27 -07:00
Yegor
a4915ad634
fix(api_docs): slightly more accurate description of Dart overrideOnEventDone
2015-07-16 14:03:27 -07:00
Yegor
fe3a55966d
fix(api_docs): slightly more accurate description of TS overrideOnEventDone
2015-07-16 14:02:39 -07:00
Tim Blasi
f1e8176995
fix(change_detect): Handle '$' in change detector strings
...
In Dart, '$' indicates the beginning of an interpolation.
- Escapes '$' in strings when generating change detector classes.
- Adds a unit test to cover this case.
2015-07-16 13:01:53 -07:00
Tobias Bosch
5654f2f4e2
test(dom_renderer): test that properties on the root element can be changed.
...
Closes #3013
Closes #3085
2015-07-16 10:39:32 -07:00
vsavkin
b1231593b6
fix(forms): do not reset the value of the input when it came from the view
2015-07-16 10:00:32 -07:00
Tobias Bosch
b1df54501a
feat(compiler): attach components and project light dom during compilation.
...
Closes #2529
BREAKING CHANGES:
- shadow dom emulation no longer
supports the `<content>` tag. Use the new `<ng-content>` instead
(works with all shadow dom strategies).
- removed `DomRenderer.setViewRootNodes` and `AppViewManager.getComponentView`
-> use `DomRenderer.getNativeElementSync(elementRef)` and change shadow dom directly
- the `Renderer` interface has changed:
* `createView` now also has to support sub views
* the notion of a container has been removed. Instead, the renderer has
to implement methods to attach views next to elements or other views.
* a RenderView now contains multiple RenderFragments. Fragments
are used to move DOM nodes around.
Internal changes / design changes:
- Introduce notion of view fragments on render side
- DomProtoViews and DomViews on render side are merged,
AppProtoViews are not merged, AppViews are partially merged
(they share arrays with the other merged AppViews but we keep
individual AppView instances for now).
- DomProtoViews always have a `<template>` element as root
* needed for storing subviews
* we have less chunks of DOM to clone now
- remove fake ElementBinder / Bound element for root text bindings
and model them explicitly. This removes a lot of special cases we had!
- AppView shares data with nested component views
- some methods in AppViewManager (create, hydrate, dehydrate) are iterative now
* now possible as we have all child AppViews / ElementRefs already in an array!
2015-07-15 20:23:27 -07:00
vsavkin
d449ea5ca4
feat(change_detection): added support for ObservableList from package:observe
2015-07-15 17:06:42 -07:00
vsavkin
583c5ffcb5
fix(ng_for): fixed ng_for to pass a change detector ref to the pipe registry
2015-07-15 17:06:42 -07:00
vsavkin
7879761a41
fix(element_injector): inject the containing change detector ref to directives
2015-07-15 17:06:42 -07:00
Rado Kirov
f7dfd2325d
chore(query): refactor QueryList and BaseQueryList.
...
Closes #3035 , #3016
2015-07-15 15:49:52 -07:00
Sigmund Cherem
b03560b670
fix(examples): add a couple entrypoints, adjust pubspec, fix change detector bug in Dart
2015-07-15 15:41:40 -07:00
Jeff Cross
903ff9047f
feat(core): add ability to reflect DOM properties as attributes
...
By binding the token `DOM_REFLECT_PROPERTIES_AS_ATTRIBUTES` provided by
the dom_renderer module to `true` in the root injector (i.e. bootstrap()),
all elements whose properties are set by angular will be reflected as
attributes with the prefix "ng-reflect-".
Fixes #2910
2015-07-15 13:59:44 -07:00
Alex Eagle
66ec4d1f5c
fix(build): clang-format
2015-07-15 13:20:38 -07:00
Alex Eagle
93055f78ea
chore(lint): require semicolons
...
Relying on ASI (automatic semicolon insertion)
is allowed in TypeScript because JavaScript allows
it. However, when we run clang-format it doesn’t
understand that these statements are terminated
with a newline and changes the indentation, in bad
cases even breaking the code.
Fixes #817
2015-07-15 12:57:32 -07:00
Jason Teplitz
33500e986b
feat(webworkers) Add MessageBus, Broker, and Serializer
2015-07-15 11:49:10 -07:00
Brian Ford
b26f99787e
chore(router): fix formatting
2015-07-15 11:10:39 -07:00
Brian Ford
8bdca5c03e
fix(router): improve error messages for routes with no config
...
Closes #2323
2015-07-15 10:28:25 -07:00
Brian Ford
ccb41632c7
feat(facade): add getTypeNameForDebugging function
2015-07-15 10:28:25 -07:00
Caitlin Potter
81abc39929
feat(http): add support for JSONP requests
...
Closes #2905
Closes #2818
2015-07-14 21:31:05 -04:00
yjbanov
b4cde697b5
chore(facade): make normalizeBlank less nonsensical
2015-07-14 17:21:54 -07:00
vsavkin
7531b48d02
fix(di): instatiate services lazily
2015-07-14 17:10:30 -07:00
Ted Sander
2bc1217409
feat(transformers): expose DI transformer for use by packages
...
Expose the DI transformer for packages that have injectable objects but do not
contain the application or angular views.
Closes #2814
2015-07-14 16:59:03 -07:00
Misko Hevery
b73ba68215
refactor(LifecycleEvent): change from onInit to Lifecycle.onInit
...
BREAKING CHANGE
Closes #2928
2015-07-14 16:51:44 -07:00
Jacob MacDonald
e988f59c08
fix(html_adapter): Implement hasAttribute and getAttribute.
...
Fixes the template compiler when running on the server.
2015-07-14 14:48:00 -07:00
Victor Berchet
7dc1dff816
refactor(NgZone): idiomatic Dart
2015-07-14 09:17:15 +02:00
Matias Niemelä
5677bf73ca
feat(router): introduce matrix params
...
Closes #2774
Closes #2989
2015-07-13 17:15:13 -07:00
Brian Ford
97ef1c27df
fix(router): export lifecycle hooks in bundle
2015-07-13 17:03:42 -07:00
vsavkin
04baa46efe
fix(di): removed default visibility
...
BREAKING CHANGE:
Directives will use the Unbounded visibility by default, whereas before the change they used Self
2015-07-13 16:00:07 -07:00
Jacob MacDonald
4bdc91892a
chore(transformer): add a test that generated change detectors dont call notifyOnBinding for template variables
2015-07-13 15:09:06 -07:00
Tobias Bosch
b3a763a718
fix(compiler): keep `DOM.hasProperty` in sync between browser and transformer.
...
Right now, we always return true until
we have property schema support (#2014 ).
Fixes #2984
Closes #2981
2015-07-13 15:09:06 -07:00
Rado Kirov
7ee6963f5d
feat(query): initial implementation of view query.
...
ViewQuery is a new API that allows a component to query its view.
Closes #1935
2015-07-13 14:44:55 -07:00
Jacob MacDonald
cf103de4a7
fix(transformer): Event getters now use property name not event name
2015-07-13 10:42:09 -07:00
Brian Ford
a9a552c112
feat(router): lifecycle hooks
...
Closes #2640
2015-07-13 09:12:15 -07:00
Richard Sentino
bdfef4ed16
docs(util/decorators): fix typos in ClassDefinition interface
...
Closes #3000
2015-07-13 09:08:12 +02:00
Martin Probst
3bf8c18c56
chore: run clang-format on code base.
...
This fixes several minor indentation issues (instanceof precendence,
type declaration specificity, template string length calculation).
This should also fix some flip-flop situations with template strings.
2015-07-12 18:50:52 +02:00
Peter Bacon Darwin
2e4a2a0e5a
chore(doc-gen): remove unnecessary `@public` and `@exportedAs` tags
2015-07-11 07:21:46 +01:00
yjbanov
0e28297e68
feat(zone): add "on event done" zone hook
2015-07-10 15:45:52 -07:00
Jeff Cross
1eebceab27
feat(pipes): add static append method to Pipes
...
This change allows creation of a new Pipes binding with new pipes appended
to pipes of an inherited Pipes instance.
Closes #2901
2015-07-10 15:42:57 -07:00
Jeff Cross
9a70f84e60
refactor(pipes): rename PipeRegistry to Pipes
...
BREAKING CHANGE:
This change renames all instances of PipeRegistry to Pipes.
As part of this change, the former "defaultPipes" export is
now a Pipes instance, instead of a map. The map that was previously
called "defaultPipes" no longer exists, but may be accessed via
defaultPipes.config.
2015-07-10 15:42:56 -07:00
Jeff Cross
8b3efdf229
chore(pipes): rename pipe_registry.ts -> pipes.ts
...
This is its own commit so that tools have an easier time of preserving
history of the file, by keeping the diff between pipes.ts and
pipe_registry.ts minimal.
Also moved pipe_registry_spec.ts
2015-07-10 15:42:56 -07:00
Sigmund Cherem
62589293aa
fix(transformer): fix 'pub build' in examples
2015-07-10 15:08:48 -07:00
Rado Kirov
749d043258
fix(css_shim): fixes multiple uses of polyfill-unscoped-rule.
2015-07-10 12:40:57 -07:00
vsavkin
a6210466c7
fix(di): do not use exceptions to detect if reflection is enabled
2015-07-10 10:50:03 -07:00
Julie Ralph
71c65b47f9
feat(test): add test bundle
...
Create a bundle for the test library, TestComponentBuilder,
TestInjector, and DebugElement.
Internal tests use a superset of the bundle.
2015-07-09 18:07:48 -07:00
vsavkin
0ed5dd0d7b
fix(di): hostInjector and viewInjector support nested arrays
2015-07-09 15:03:38 -07:00
Pouria Alimirzaei
b716046b97
feat(pipes): add date pipe
...
Closes #2877
2015-07-09 15:00:14 -07:00
Pouria Alimirzaei
3143d188ae
feat(pipes): add number (decimal, percent, currency) pipes
2015-07-09 14:59:57 -07:00
vsavkin
b54e7214f0
chore: removed angular2.api.ts
...
BREACKING CHANGE:
We export InjectMetadata instead of InjectAnnotation
2015-07-09 13:54:07 -07:00
Matias Niemelä
d6dadc6efc
fix(router): fix broken `HashLocationStrategy` string issue for dart
2015-07-09 13:21:17 -07:00
Victor Berchet
447926dc08
refactor(RegExp): use /.../ to create RegExp literal
...
fixes #2691
2015-07-09 09:14:25 +02:00
Pawel Kozlowski
6596c72131
docs(NgStyle): add documentation
...
Closes #2931
2015-07-08 16:11:19 -07:00
Pawel Kozlowski
f827e1532e
docs(CSSClass): add documentation
...
Closes #2933
2015-07-08 16:09:24 -07:00
Pawel Kozlowski
bab271fcb4
test(CssClass): verify that classes from string exp are cleared properly
...
Closes #2888
Closes #2934
2015-07-08 16:08:32 -07:00
Alfonso Presa
0792f1a7a1
fix(tsconfig): target should be lower case
...
closes #2938
2015-07-08 16:07:25 -07:00
Bob Nystrom
ac50ffca5e
fix(transform): handle multiple interfaces in directive processor
...
Comma separate the list of interfaces in the directive transformer.
Closes #2941
2015-07-08 16:05:42 -07:00
Matias Niemelä
caa252e57b
chore(router): change `substr` to `substring`
2015-07-08 15:46:51 -07:00
Matias Niemelä
c177d889a2
fix(router): ensure that page refresh with hash URLs works
...
This patch fixes the `HashLocationStrategy` to always return a string
path value without a hash symbol as the starting value.
Closes #2920
2015-07-08 15:08:17 -07:00
vsavkin
3f7ebde037
feat(forms): changed all form directives to have basic control attributes
2015-07-08 12:04:38 -07:00
vsavkin
4656c6f5cf
tools: added experimentalDecorators flag to tsconfig
2015-07-08 10:46:03 -07:00
cexbrayat
e0fb50cc3c
docs(view_ref): fix typos
...
Closes #2930
2015-07-08 18:06:40 +02:00
cexbrayat
7d9f5d7538
docs(element_ref): fix typos
2015-07-08 18:06:39 +02:00
Pawel Kozlowski
2ac8ebd3ef
refactor(directive_parser): improve code readability
...
Closes #2876
2015-07-08 18:02:08 +02:00
Misko Hevery
871267d578
chore(.d.ts): remove private Compiler deps
...
Closes #2929
2015-07-08 08:07:08 +02:00
Misko Hevery
c33e3be735
chore(.d.ts): remove *Args files
2015-07-07 20:04:14 -07:00
Misko Hevery
3ab8a0c438
chore(docs): adding docs to core.ts and annotations.ts
2015-07-07 20:04:13 -07:00
Misko Hevery
12a427e158
fix(.d.ts): correct ComponentAnnotation inheritance
...
Closes #2356
2015-07-07 20:04:13 -07:00
Misko Hevery
0052c6b120
chore: improve angular2.d.ts file
...
- support ambient and import format for .d.ts
2015-07-07 20:04:13 -07:00
Misko Hevery
65a767d9b0
refactor: export angular as ‘ng’ in SFX
2015-07-07 20:04:13 -07:00
gdi2290
e5405e4ba2
fix(forms): Remove cyclic dependency
...
correctly resolve Renderer by removing cyclic dependencies
Closes #2856
2015-07-07 16:25:43 -07:00
Melinda Sarnicki Bernardo
b60d714acf
docs: Corrects article to 'a' instead of 'an' in comment
...
Closes #2858
2015-07-07 16:24:23 -07:00
Alfonso Presa
edf5053bf0
feat(NgStyle): Export NgStyle in angular2/directives
...
Closes #2878
2015-07-07 16:20:24 -07:00
Eric Lee Carraway
3869818d8f
docs(modules): fix typos
...
closes #2914
2015-07-07 16:14:43 -07:00
Brian Ford
286a249a9a
feat(router): support deep-linking to siblings
...
Closes #2807
2015-07-07 14:54:59 -07:00
Brian Ford
d828664d0c
fix(router): allow generating links with numeric params
2015-07-07 14:54:59 -07:00
Jacob MacDonald
9e1158de4f
fix(transformer): Support prefixed annotations in the transformer.
...
closes https://github.com/angular/angular/issues/2754
2015-07-07 11:26:42 -07:00
vsavkin
569766fa8b
refactor(di): added support for custom dep providers
2015-07-07 08:27:54 -07:00
vsavkin
c2efa23e94
fix(change_detection): throw ChangeDetectionError in JIT mode
2015-07-06 18:03:50 -07:00
vsavkin
d2774421e8
fix(change_detection): do not coalesce records with different directive indices
2015-07-06 17:59:38 -07:00
Alex Eagle
8681f79182
chore(typings): move comments to decorator args.
...
The properties of the annotation classes are not really the public API.
Users will interact with these via a decorator, and the decorator
takes a single arg, typed with the args class. Thus the comment is
more useful on the arg class.
This also fixes the problem of intellisense/autocomplete not showing
the important docs as you fill in the properties in a decorator
declaration.
2015-07-06 17:25:59 -07:00
Alex Eagle
b10d7a2e51
fix(angular2.d.ts): show typing for Component, etc
...
We had the same symbol exported as the interface
for Component decorator as well as the class for
Component annotation, and dgeni only showed the
latter.
Rename the interfaces for decorators with an ‘I’
prefix so they are retained in the .d.ts output.
2015-07-06 17:25:59 -07:00
Alex Eagle
a56d33d7ca
feat(typings): mark void methods in angular2.d.ts
...
Previously, when a return type was missing it
could have been any. But following #2746 we
require return types so remaining untyped returns
must be void.
2015-07-06 17:25:59 -07:00
Jacob MacDonald
2b45bd2a63
fix(transformer): Put paramater data in the same order as the reflected version.
...
Previously it would be [@Inject(#thing), Thing], but it should be [Thing, @Inject(#thing)].
2015-07-06 15:48:00 -07:00
Jacob MacDonald
7986e7ce7e
feat(transformer): Support @Injectable() on static functions
2015-07-06 15:47:54 -07:00
Jacob MacDonald
311b47720b
fix(transformer): Fix string interpolation for bindings.
...
Previously it did not stringify properties and used `+` instead of ` `.
2015-07-06 14:57:21 -07:00
Pawel Kozlowski
582551bea9
test(ProtoViewBuilder): correct duplicate tests
...
Closes #2860
2015-07-06 22:40:49 +02:00
Itay Radotzki
883b506445
fix(Http): add support for headers
2015-07-06 10:06:12 -07:00
Igor Minar
1c94c32f4d
fix(router): child routers should delegate navigation to the root router
...
There is an e2e tests in the examples/routing app testing this behavior
2015-07-02 23:21:33 -07:00
Igor Minar
d5ace7a562
test(route_link): add missing unit tests
2015-07-02 23:21:33 -07:00
Igor Minar
2ed251a5db
docs(router): fix doc
2015-07-02 23:21:05 -07:00
Pawel Kozlowski
cd65fc2a5e
fix(compiler): detect and strip data- prefix from bindings
...
Fixes #2687
Closes #2719
2015-07-02 17:32:12 +02:00
vsavkin
d1393b0581
fix(di): injecting null causes a cyclic dependency
2015-07-01 17:08:45 -07:00
Pawel Kozlowski
0598226e24
fix(compiler): don't trigger duplicated directives
...
Fixes #2756
Closes #2568
2015-07-01 16:13:26 -07:00
Pouria Alimirzaei
0b50258814
feat(pipes): add limitTo pipe
2015-07-01 13:36:01 -07:00
Pouria Alimirzaei
600d53c68e
feat(pipes): support arguments in transform function
2015-07-01 13:36:01 -07:00
vsavkin
f0e962c55e
feat(di): removed app injector
...
BREAKING CHANGE:
THe appInjector property has been removed. Instead use viewInjector or hostInjector.
2015-07-01 13:33:43 -07:00
Jacob MacDonald
73a939e76c
fix(change detectors): Fix deduping of protos in transformed dart mode.
...
In non-transformed mode the funcOrValue check was enough, but once
transformed these all use the same function for getters, so we need
to also check the name.
2015-07-01 12:56:31 -07:00
Ted Sander
dcdd73065a
feat(transformers): provide a flag to disable inlining views
...
Add a flag to allow a user to disable inlining css/html content into the views.
Closes #2658
2015-07-01 11:39:16 -07:00
Jeff Cross
34eaf65a79
docs(Http): add docs about breaking changes with EventEmitter/Observable
...
BREAKING CHANGE:
The Http module previously would return RxJS Observables from method calls
of the Http class. In order to support Dart, the module was refactored to
return the EventEmitter abstraction instead, which does not contain the same
combinators or subscription semantics as an RxJS Observable. However, the
EventEmitter provides a toRx() method which will return an RxJS Subject,
providing the same subscription and combinator conveniences as were
available prior to this refactor.
This is temporary, until issue #2794 is resolved, when Observables will
again be returned directly from Http class methods.
2015-07-01 10:34:12 -07:00
Alex Eagle
27e710019c
chore(typing): use types for DOM API
...
This is possible now that ts2dart special cases these for dart.
Fixes #2770
2015-07-01 09:57:11 -07:00
Pawel Kozlowski
530e742628
refactor(injector): remove unused function
...
Closes #2815
2015-07-01 15:27:23 +02:00
Alex Eagle
a90063a827
chore(typing): restore some defn's now that dgeni is fixed
...
Closes #2446
Closes #2805
2015-07-01 12:53:10 +01:00
Brian Ford
1fb948461e
style: fix formatting for real
2015-06-30 20:38:08 -07:00
Brian Ford
27c050be86
style: fix formatting
2015-06-30 19:55:44 -07:00
Brian Ford
f66ce096d8
feat(router): support deep-linking to anywhere in the app
...
Closes #2642
2015-06-30 17:21:50 -07:00
Brian Ford
2335075506
feat(facade): add ListWrapper.toJSON method
2015-06-30 17:21:50 -07:00
Jeff Cross
b3d98cba77
refactor(http): remove default settings from `RequestOptions` constructor
...
The BaseRequestOptions class is responsible for declaring default values,
while the RequestOptions class is merely responsible for setting values
based on values provided in the constructor.
2015-06-30 15:21:36 -07:00
Jeff Cross
146dbf1270
refactor(Http): remove HttpFactory
...
BREAKING CHANGE: HttpFactory is no longer available.
This factory provided a function alternative to the `request` method of the
Http class, but added no real value. The additional factory required an
additional IHttp interface, an odd way to inject while preserving type information
(`@Inject(HttpFactory) http:IHttp`), and required additional documentation in the
http module.
Closes #2564
2015-06-30 15:21:36 -07:00
Jeff Cross
55bf0e554f
feat(http): refactor library to work in dart
...
Mostly internal refactoring needed to make ts2dart and DartAnalyzer happy.
Fixes #2415
2015-06-30 15:21:36 -07:00
Alex Eagle
8bab6dd239
fix(build): Reduce rx typings to what we actually require.
...
This should help a lot with github rate limiting by removing about
2/3 of the dependencies.
2015-06-29 16:59:04 -07:00
Alex Eagle
44891996b5
fix(build): add missing return types now enforced by linter
2015-06-29 15:31:41 -07:00
Julie Ralph
8c66a25270
chore(test): remove TestBed
...
Instead, use TestComponentBuilder.
Closes #2354
2015-06-29 14:18:33 -07:00
Julie Ralph
82e8e8c638
chore(test): upgrade form tests to testcomponentbuilder
...
Part of #2354
2015-06-29 13:59:12 -07:00
Victor Berchet
27ad984626
refactor(Router): re-use resolved promise instances
2015-06-29 21:27:07 +02:00
Victor Berchet
1f04f70eda
refactor(Router): idiomatic TS
2015-06-29 21:27:07 +02:00
Victor Berchet
eea989bef8
fix(Router): mark Pipeline and RouteRegistry as Injectable
...
fix #2755
2015-06-29 21:27:07 +02:00
Tobias Bosch
d6cef88dd8
fix(dynamic_component_loader): check whether the dynamically loaded component has already been destroyed
...
Fixes #2748
Closes #2767
2015-06-29 11:30:56 -07:00
vsavkin
eb0fd7967c
feat(di): changed InstantiationError to print the original stack
2015-06-29 11:16:12 -07:00
vsavkin
56245c6aa2
feat(lang): added originalException and originalStack to BaseException
2015-06-29 11:16:12 -07:00
Julie Ralph
ab3f2365fd
chore(test): move ng-style tests to TestComponentBuilder
...
Part of #2354
2015-06-29 10:59:32 -07:00
Julie Ralph
66d0e4e656
chore(test): migrate router tests to TestComponentBuilder
...
Part of #2354
2015-06-29 10:58:39 -07:00
Tobias Bosch
0f7dd62f16
chore(npm): correct generated package json files.
2015-06-29 10:30:00 -07:00
uber5001
c4e10ea9ac
chore(benchpress): add browserify bundling
...
Use browserify to bundle benchpress and its dependencies.
2015-06-29 10:29:59 -07:00
vsavkin
22d3943831
refactor(di): unified di injector and core injector
...
BREAKING CHANGES:
* InjectAsync and InjectLazy have been removed
* toAsyncFactory has been removed
2015-06-26 15:59:18 -07:00
vsavkin
b688dee4c8
feat(async): added PromiseWrapper.wrap
2015-06-26 15:58:52 -07:00
Jacob MacDonald
5a21dc5340
fix(transformer): Add getters for `events`.
...
closes https://github.com/angular/angular/issues/2725
2015-06-26 08:07:46 -07:00
Jacob MacDonald
d037c082fb
fix(transformer): Don't hang on bad urls and log better errors
...
closes https://github.com/angular/angular/issues/2605
2015-06-26 07:18:58 -07:00
Jacob MacDonald
9c768501c4
fix(transformer): Fix annotation_matcher for NgForm directive.
...
The NgForm directive imports Directive from a previously unlisted import.
2015-06-26 07:16:03 -07:00
Pawel Kozlowski
b50edfd1f3
feat(NgStyle): add new NgStyle directive
...
Closes #2665
2015-06-26 12:50:20 +02:00
Marc Laval
dd7910347a
chore(windows): fix the test.server.dart task
...
Closes #2703
2015-06-26 10:25:26 +02:00
Marc Laval
ecb2bd0cbe
chore(windows): fix the build.dart task
2015-06-26 10:24:12 +02:00
Kevin Moore
393f703a97
fix: export top-level pipe factories as const
...
Also appComponent(Ref|Type)Token
Related to https://github.com/angular/angular/issues/1485
2015-06-25 15:16:24 -07:00
Jason Teplitz
7a7b3a6cb9
perf(Compiler): do not resolve bindings for cached ProtoViews
2015-06-25 14:45:08 -07:00
Pawel Kozlowski
8a5cf8f6bd
docs(directives): correct property binding examples
...
Closes #2663
2015-06-25 15:12:16 +02:00
Pawel Kozlowski
aeb17d8d44
test(NgSwitch): simplify tests with static values
2015-06-25 15:12:16 +02:00
Julie Ralph
85d6ae38b9
chore(test): migrate directives tests to testcomponentbuilder
...
Part of #2354
2015-06-24 21:58:36 -07:00
Julie Ralph
d3dda614dd
chore(test): migrate remaining core tests to testcomponentbuilder
...
Also add a small utility function to debug element to get an
array of native elements, which works smoothly with the
toHaveText matcher.
2015-06-24 21:52:03 -07:00
Victor Berchet
a0e0f3123b
refactor: change template for view where it makes sense
2015-06-24 18:40:04 +02:00
Victor Berchet
b15474c6f2
refactor(TemplateResolver): rename to ViewResolver
2015-06-24 18:40:04 +02:00
Victor Berchet
356c927d12
refactor(TemplateLoader): rename to ViewLoader
2015-06-24 18:40:04 +02:00
Victor Berchet
b89c0672e6
test(refactor): cleanup test to use the new UrlMapper
2015-06-24 18:40:04 +02:00
Victor Berchet
0a2f6ddc64
fix(parse5): do not try to insert empty text node
2015-06-24 18:40:03 +02:00
Victor Berchet
3ea655918e
refactor(Compiler): inline styles before compiling the template
2015-06-24 18:40:03 +02:00
Victor Berchet
3875f02a52
refactor(UrlResolver): move away from the anchor link
...
fixes #2029
fixes #872
2015-06-24 18:40:03 +02:00
Victor Berchet
06aaa0c50e
refactor(UrlResolver): extract app url resolution into AppRootUrl
...
fixes #1732
2015-06-24 18:40:03 +02:00
Pawel Kozlowski
8c993dca03
feat(CSSClass): add support for string and array expresions
...
Closes #2025
2015-06-24 16:17:10 +02:00
Julie Ralph
2c11205b96
chore(testbed): migrate compiler integration spec to testcomponentbuilder
...
Part of #2354
2015-06-23 19:02:46 -07:00
Rado Kirov
d800d2f5d7
fix(injectors): sync injector tree with dom element tree.
...
Changes adds createGrowableSize method to allow for growable lists with fixed
start.
Closes : #2498
2015-06-23 18:32:57 -07:00
Daria Jung
24646e7eb8
feat(typings): add typing specs
...
add test in gulpfile which will compile a basic TS file with generated
angular2.d.ts to ensure generated d.ts is valid syntactic TS
Adds support for enums in .d.ts generation pipeline.
Removes renaming reexports in http module.
2015-06-23 18:22:47 -07:00
Tobias Bosch
6149ce28a7
fix(render): fix failing tests in dynamic_component_loader.ts
2015-06-23 17:43:36 -07:00
Tobias Bosch
c8bdacb195
refactor(render): cleanup access to native dom elements
...
BREAKING CHANGES:
- rename `ElementRef.domElement` to `ElementRef.nativeElement`
- add `Renderer.getNativeElementSync` to make the app side
less dependent on the dom renderer.
- don’t use `ElementRef.nativeElement` in directives but
use the methods on `Renderer` directly.
- Removed `ElementRef.setAttribute`. Use `Renderer.setElementAttribute` instead.
Closes #2712
Last part of #2476
Closes #2476
2015-06-23 17:27:59 -07:00
Julie Ralph
5c9e53a25e
chore(testbed): migrate dynamic component loader spec to testcomponentbuilder
...
Part of #2354
2015-06-23 16:33:11 -07:00
Tobias Bosch
ba9fecd068
refactor(render): use `RenderElementRef` in all renderer methods
...
BREAKING CHANGES:
- Almost all methods in `Renderer` now take a `RenderElementRef` instead
of a `ViewRef` + `boundElementIndex`.
- These methods can be called with the `ElementRef` from the app side
directly.
Closes #2706
Related to #2476
2015-06-23 14:26:34 -07:00
Brian Ford
a67f2314f9
feat(router): add support for hash-based location
...
Closes #2555
2015-06-22 18:46:20 -07:00
Tobias Bosch
0a51ccbd68
feat(render): don’t use the reflector for setting properties
...
BREAKING CHANGES:
- host actions don't take an expression as value any more but only a method name,
and assumes to get an array via the EventEmitter with the method arguments.
- Renderer.setElementProperty does not take `style.`/... prefixes any more.
Use the new methods `Renderer.setElementAttribute`, ... instead
Part of #2476
Closes #2637
2015-06-22 18:35:16 -07:00
Brian Ford
2932377769
feat(mock): add mock module and bundle
...
Closes #2325
2015-06-22 16:14:25 -07:00
Brian Ford
e5de1f771a
refactor(router): refactor BrowserLocation into LocationStrategy
...
This makes it easy to mock browser location and paves the way to
implementing hash routing.
2015-06-22 16:14:24 -07:00
vsavkin
92ffc465d6
feat(host): limits host properties to renames
2015-06-22 12:10:02 -07:00
Yegor Jbanov
c1a494bc37
chore(ShadowDomStrategy): remove redundant field styleInliner
2015-06-22 11:15:46 -07:00
Pawel Kozlowski
d7b9345b6d
feat(compiler): detect dangling property bindings
...
BREAKING CHANGE: compiler will throw on binding to non-existing properties.
Till now it was possible to have a binding to a non-existing property,
ex.: `<div [foo]="exp">`. From now on this is compilation error - any
property binding needs to have at least one associated property:
eaither on an HTML element or on any directive associated with a
given element (directives' properites need to be declared using the
`properties` field in the `@Directive` / `@Component` annotation).
Closes #2598
2015-06-20 08:06:07 +02:00
Yegor Jbanov
f158fbd131
chore(ShadowDomStrategy): fix MapWrapper usage, DemoUrlResolver
2015-06-19 18:50:30 -07:00
Victor Berchet
1c4d233fe7
fix(ShadowDomStrategy): always inline import rules
...
fixes #1694
2015-06-19 18:50:30 -07:00
Caitlin Potter
ed9d9d5096
build(broccoli): make node_trees produce strict-mode scripts
...
Closes #2575
Closes #2648
2015-06-19 21:19:12 -04:00
Matias Niemelä
2d2ae9b8d8
feat(router): enforce usage of ... syntax for parent to child component routes
2015-06-19 20:54:45 -04:00
vsavkin
fa7a3e3449
cleanup: explicitly export symbols from di, cd, forms
2015-06-19 16:59:40 -07:00
vsavkin
20a8f0dbe5
refactor(pipes): removed pipes from properties
...
BREAKING CHANGE:
This PR remove an ability to use pipes in the properties config. Instead, inject the pipe registry.
2015-06-19 16:56:52 -07:00
Pawel Kozlowski
ad7aca631d
refactor(NgClass): remove pipes from property bindings
2015-06-19 16:56:52 -07:00
vsavkin
c899b0a74c
feat(element_injector): support multiple injectables with the same token
2015-06-19 16:02:56 -07:00
vsavkin
5ba5da5d25
cleanup(forms): cleanup
2015-06-19 16:02:43 -07:00
vsavkin
4d1ed509e3
refactor(forms): refactored forms to user Query to get html validators
2015-06-19 16:02:43 -07:00
Martin Probst
920982c4e8
chore: update files to match clang-format 1.0.21.
2015-06-19 15:00:32 -07:00
Jacob MacDonald
f9d72bd85b
fix(transformer): Throw unimplemented errors in HtmlAdapter.
...
closes #2624
closes #2627
2015-06-19 14:45:58 -07:00
Ted Sander
f2ef90b240
feat(transformers): inline styleUrls to view directive
...
While creating the ng_deps.dart file for a view inline the styleUrls attribute.
This copies the pattern used for templateUrl, aleviating the need to make an
XHR request for those resources.
closes #2566
2015-06-18 22:12:44 -07:00
vsavkin
f80f97253c
refactor(change_detection): made ChangeDetector and ProtoChangeDetector interfaces
...
List of changes:
- Makes ChangeDetector and ProtoChangeDetector interfaces
- Assigns a unique id to every detector
2015-06-18 17:41:22 -07:00
Tobias Bosch
9d4111d69d
fix(compiler): make text interpolation more robust
...
Allows to add or remove previous siblings of text
interpolations (e.g. by added `<script>` tags for
content reproduction, or by removed `<style>` tags).
Also calculates correctly whether an element is
empty.
Fixes #2591
2015-06-18 15:45:00 -07:00
Tobias Bosch
180e617866
Revert "fix(Compiler): fix text nodes after content tags"
...
This reverts commit d599fd3434
.
but keeps the integration test. The test is made green by the
following commits.
2015-06-18 15:45:00 -07:00
Brian Ford
bc798b182d
fix(router): return promise with error handler
...
See https://github.com/angular/angular/pull/2528\#discussion_r32493195
2015-06-18 14:57:33 -07:00
Martin Probst
941362014b
feat: remove MapWrapper.clear().
...
It's the same in Dart and JavaScript.
2015-06-18 14:55:13 -07:00
Martin Probst
dfd30910aa
feat: remove MapWrapper.contains().
2015-06-18 14:55:12 -07:00
Martin Probst
be7ac9fd41
feat: remove MapWrapper.create()/get()/set().
...
Better dart2js code, better Angular code.
2015-06-18 14:55:12 -07:00
Martin Probst
35e882e74f
feat: add constructors without type arguments.
...
As the constructed objects have an any type, the
resulting containers are assignable to any type:
var x: Map<string, number> = new Map();
That is useful to avoid having to specify types
twice when declaration and assignment are in
different places.
2015-06-18 14:55:12 -07:00
Yegor Jbanov
5beaf6d735
fix(change detection): preserve memoized results from pure functions
2015-06-17 17:33:37 -07:00
vsavkin
b0e2ebda70
feat(query): added support for querying by var bindings
2015-06-17 16:36:55 -07:00
vsavkin
cd21df3572
refactor(element_injector): renamed Query.directive into Query.selector
2015-06-17 16:25:41 -07:00
Martin Probst
c7e48350d3
chore: kill ListWrapper.create() and .push().
...
These wrappers are not natively understood by
ts2dart. Removing them will improve Dart2JS
compilation due to fewer megamorphic calls to List
functions.
It also makes Angular code more succinct and
improves type safety in Angular due to better type
inference of the Array component type.
This change exposed several bugs in Angular.
2015-06-17 16:21:55 -07:00
Martin Probst
6af41a4543
chore: add missing `.d.ts` to type reference.
...
/// <reference> tags actually take a precise
path, it seems.
2015-06-17 16:21:55 -07:00
Martin Probst
f9eb8a44d1
chore: add some FIXMEs to globals.d.ts.
...
StringMap really ought to always enforce a string
key, and also ought to have an index property.
This currently breaks too much code in Angular, so
should be fixed in a follow up Pull Request
separate from this.
2015-06-17 16:21:54 -07:00
Victor Berchet
dcc4bc2735
fix(annotations): swap DirectiveArgs & ComponentArgs
2015-06-17 21:59:53 +02:00
Tobias Bosch
5dee8e26cc
fix(views): remove dynamic component views, free host views, free embedded views
...
Closes #2472
Closes #2339
BREAKING CHANGE
- `Compiler.compile` has been removed, the only way to compile
components dynamically is via `Compiler.compileInHost`
- `DynamicComponentLoader.loadIntoExistingLocation` has changed:
* renamed into `loadIntoLocation`
* will always create the host element as well
* requires an element with a variable inside of the host component view
next to which it will load new component.
- `DynamicComponentLoader.loadNextToExistingLocation` was renamed into
`DynamicComponentLoader.loadNextToLocation`
- `DynamicComponentLoader.loadIntoNewLocation` is removed
* use `DynamicComponentLoader.loadNextToLocation` instead
and then move the view nodes
manually around via `DomRenderer.getRootNodes()`
- `AppViewManager.{create,destroy}Free{Host,Embedded}View` was removed
* use `AppViewManager.createViewInContainer` and then move the view nodes
manually around via `DomRenderer.getRootNodes()`
- `Renderer.detachFreeView` was removed. Use `DomRenderer.getRootNodes()`
to get the root nodes of a view and detach them manually.
2015-06-17 11:33:51 -07:00
Pawel Kozlowski
df6acedd25
refactor(RenderCompiler): minor changes to PropertyBindingParser
...
Closes #2583
2015-06-17 13:53:33 +02:00
Victor Berchet
ffd1ac425e
style(DI): idiomatic TS
2015-06-17 11:22:16 +02:00
Victor Berchet
edd01615c3
refactor(Lexer): switch token types to an enum
2015-06-17 11:16:33 +02:00
Andreas Argelius
9700e80698
fix(docs): Fix docs for Directive.compileChildren
2015-06-17 09:14:44 +02:00
gdi2290
cd735c4837
fix(XHRImpl): file:/// and IE9 bugs
2015-06-17 09:14:26 +02:00
Misko Hevery
b2c66949b2
feat: allow Type.annotations = Component(...).View(...)
...
Closes #2577
2015-06-16 16:36:46 -07:00
Misko Hevery
eb3586d777
fix: makes NgModel work in strict mode
2015-06-16 16:36:46 -07:00
Jeff Cross
5b5ffe75d0
docs(Http): add docs for Http lib
...
Fixes #2442
2015-06-16 15:42:18 -07:00
Jeff Cross
e68e69e7e5
refactor(Http): rename request options interface
2015-06-16 15:42:01 -07:00
Jeff Cross
70ffd267f8
refactor(Http): implement Request object parameter for http.request
...
Fixes #2416
2015-06-16 15:42:01 -07:00
Jeff Cross
b68e561c0f
feat(Http): add Http class
...
Fixes #2530
2015-06-16 15:42:01 -07:00
Jeff Cross
93596dff3f
feat(BaseRequestOptions): add merge method to make copies of options
2015-06-16 15:42:01 -07:00
Victor Berchet
598a75ec1c
style(ChangeDetection): idiomatic TS
2015-06-16 19:45:00 +02:00
Victor Berchet
cdfb635737
refactor(facade): refactor type check function - is*()
2015-06-16 19:27:34 +02:00
Pawel Kozlowski
2d499de2bd
refactor(view): remove unused const
...
Closes #2561
2015-06-16 17:56:21 +02:00
Victor Berchet
91c75f99fe
refactor(ShadowDomStrategy): remove unused imports in test
2015-06-16 17:41:32 +02:00
Victor Berchet
6e38515402
fix(ShadowDom): fix emulation integration spec to test all 3 strategies
...
fixes #2546
2015-06-16 17:38:42 +02:00
Victor Berchet
d599fd3434
fix(Compiler): fix text nodes after content tags
...
fixes #2095
2015-06-16 17:38:42 +02:00
Victor Berchet
b2e6ad85ea
style(TestComponentBuilder): fix a typo in the spec
2015-06-16 17:37:58 +02:00
vsavkin
d8e2795368
fix(view): local variables override local variables set by ng-for
2015-06-16 07:48:26 -07:00
Pawel Kozlowski
7a41b19e58
test(PropertySetterFactory): add more tests
...
There are upcoming changes to the way we generate
and verify setters so more test are needed to cover
all the corner cases that are being handled today.
Closes #2559
2015-06-16 14:49:59 +02:00
Misko Hevery
bc9e482b39
fix: Class factory now adds annotations
2015-06-15 22:23:54 -07:00
Brian Ford
cab1d0ef0f
feat(router): allow configuring app base href via token
2015-06-15 18:04:09 -07:00
vsavkin
f1541e65b3
fix(forms): fixed the handling of the select element
2015-06-15 13:16:41 -07:00
Tobias Bosch
9bad70be5e
fix(selector): select by attribute independent of value and order
...
Closes #2513
2015-06-15 12:10:11 -07:00
vsavkin
5bfcca2d5b
feat(query): notify on changes
2015-06-15 11:10:21 -07:00
Matias Niemelä
73d152506b
fix(router): ensure that root URL redirect doesn't redirect non-root URLs
...
Closes #2221
2015-06-15 10:48:47 -07:00
Matias Niemelä
3154cea0bf
docs(router): `alias` should be `as`
2015-06-15 10:48:29 -07:00
Victor Berchet
ac3e624d0f
feat(View): add support for styleUrls and styles
...
fixes #2382
2015-06-15 19:35:16 +02:00
Victor Berchet
f065a2ecb7
style(ShadowDomStrategy): remove an extra semi-colon
2015-06-15 19:35:16 +02:00
Victor Berchet
a46df6f829
refactor(StringWrapper): add missing types
2015-06-15 19:35:16 +02:00
Victor Berchet
da60381c89
feat(AstTranformer): add support for missing nodes
2015-06-15 18:54:12 +02:00
Victor Berchet
7d32879929
feat(Parser): support if statements in actions
...
fixes #2022
2015-06-15 18:54:12 +02:00
Victor Berchet
d64cc8d87d
style(render): idiomatic TS
2015-06-15 18:53:47 +02:00
Victor Berchet
cebf69933c
style(compiler): idiomatic TS
2015-06-15 18:53:47 +02:00
Misko Hevery
c3ae34f066
feat: support decorator chaining and class creation in ES5
...
Closes #2534
2015-06-14 16:54:08 -07:00
Peter Bacon Darwin
4f581671dc
style(change_detection): fix clang error: line too long
2015-06-15 00:44:20 +01:00
Peter Bacon Darwin
5a542d8ba8
docs(change_detection): fix link to `PreGeneratedChangeDetection`
2015-06-15 00:16:10 +01:00
Jeff Cross
dd23bab3ad
fix(docs): update link paths in annotations
...
Partial fix to #2452
Closes #2475
2015-06-15 00:11:59 +01:00
vsavkin
9908def857
fix(bootstrap): temporary disable jit change detection because of a bug in handling pure functions
2015-06-13 16:06:22 -07:00
Brian Ford
5782f063f1
fix(router): rethrow exceptions
...
Closes #2391
2015-06-12 18:27:00 -07:00
Martin Probst
4ae7df27d2
fix: improve type safety by typing `refs`.
2015-06-12 18:02:07 -07:00
Martin Probst
c3c2ad1454
fix: improve type of TreeNode.children.
2015-06-12 18:02:07 -07:00
vsavkin
c51aef9f7d
fix(element_injector): changed visibility rules to expose hostInjector of the component to its shadow dom
2015-06-12 17:17:31 -07:00
Tim Blasi
bbfb4e1dcc
fix(dynamic_component_loader): Fix for ts2dart issue
...
Fix a build break by declaring a type for `locals`.
See https://github.com/angular/ts2dart/wiki/Builtin-fa%C3%A7ade-methods#fixing-untyped-property-access-errors
for some context.
2015-06-12 16:55:08 -07:00
Tim Blasi
e0fbd4b624
fix(change detect): Fix bug in JIT change detectors
...
Fix the "ifChangedGuard" code in the JIT change detector which was
incorrectly refactored in a2770c8a52
.
2015-06-12 16:32:21 -07:00
Tim Blasi
8e3bf3907a
feat(dart/transform): Use the best available Change Detectors
...
Enable pregenerated (for Dart) and JIT (for Js) change detectors when
possible. Previously we would always use `DynamicChangeDetector`s, but
these cause megamorphic calls and are therefore much slower.
Closes #502
2015-06-12 16:04:09 -07:00
vsavkin
21dcfc89e9
fix(dynamic_component_loader): implemented dispose for dynamically-loaded components
2015-06-12 15:47:09 -07:00
Martin Probst
f3d741854a
fix: add types for ts2dart's façade handling.
...
... in many, many places.
2015-06-12 15:41:08 -07:00
Martin Probst
c4ecbf0a7f
fix: rename FORWARD_REF to forwardRef in the Angular code base.
...
Now that ts2dart understands forwardRef, there's
no need to maintain the old syntax.
2015-06-12 15:41:08 -07:00
Martin Probst
13466604f9
fix: declare var global.
...
This is required as otherwise our code ends up
with an undeclared symbol in `global`. It declares
it to the same type as it'd have in nodejs, <any>.
2015-06-12 15:41:08 -07:00
Matias Niemelä
cdc7b03e67
fix(router): avoid two slash values between the baseHref and the path
2015-06-12 15:23:29 -07:00
Matias Niemelä
e372cc779d
fix(router): do not prepend the root URL with a starting slash
2015-06-12 15:23:29 -07:00
Victor Berchet
38e5c3f918
style: format the code with the updated clang
2015-06-12 19:07:13 +02:00
Victor Berchet
b4e82b8bc7
fix(DirectiveMetadata): add support for events, changeDetection
2015-06-12 19:05:51 +02:00
Victor Berchet
db3d5d4941
refactor(_DirectiveMetadataVisitor): simplify the code
...
fixes #2493
2015-06-12 19:05:51 +02:00
Martin Probst
a6e7123995
feat: adjust formatting for clang-format v1.0.19.
2015-06-12 09:51:57 -07:00
Victor Berchet
7648bb8ee3
doc(Lifecycle events): Document the call order
2015-06-12 18:51:04 +02:00
vsavkin
35197acc1a
fix(forms): fixed the selector of NgRequiredValidator
2015-06-12 09:45:56 -07:00
vsavkin
6622826587
docs(forms): updated forms docs to cover new apis
2015-06-12 09:45:55 -07:00
vsavkin
4fe919335c
refactor(forms): made directive names consistent
2015-06-12 09:45:55 -07:00
vsavkin
a858f6ac42
fix(forms): getError does not work without path
2015-06-12 09:45:55 -07:00
Rado Kirov
355ab5b3a6
feat(query): adds support for descendants and more list apis.
...
Additional clean up of query code.
Closes : #1935
BREAKING CHANGE:
By default Query only queries direct children.
2015-06-11 16:05:06 -07:00
Tobias Bosch
ca09701343
perf(render): only create `LightDom` instances if the element has children
2015-06-11 14:45:44 -07:00
Tobias Bosch
4f27611ae6
perf(render): don't create property setters if not needed
2015-06-11 14:45:44 -07:00
Tobias Bosch
24e647e0f7
perf(render): precompute # bound text nodes and root nodes in `DomProtoView`
2015-06-11 14:45:44 -07:00
Tobias Bosch
9cd510abaa
perf(render): don’t create an intermediate element array in renderer
2015-06-11 14:45:43 -07:00
Misko Hevery
5ab92ce844
bug: increase number of supported contstructor args to 20
...
Closes #2487
2015-06-11 14:02:36 -07:00
Victor Berchet
591f742d42
feat(transform): update for Directive.host
2015-06-11 13:11:10 -07:00
Victor Berchet
20953ed492
doc(Directive): update docs for Directive.host
2015-06-11 13:11:09 -07:00
Victor Berchet
f3b49378e4
feat(Directive): Have a single Directive.host which mimics HTML
...
fixes #2268
BREAKING CHANGE:
Before
@Directive({
hostListeners: {'event': 'statement'},
hostProperties: {'expression': 'hostProp'},
hostAttributes: {'attr': 'value'},
hostActions: {'action': 'statement'}
})
After
@Directive({
host: {
'(event)': 'statement',
'[hostProp]': 'expression' // k & v swapped
'attr': 'value',
'@action': 'statement'
}
})
2015-06-11 13:11:09 -07:00
Victor Berchet
47b6b05017
doc(Directive): fix the inline doc for lifecycle events
2015-06-11 13:11:09 -07:00
Victor Berchet
f9745327e6
fix(Parser): Parse pipes in arguments
...
fixes #1680
2015-06-11 21:02:40 +02:00
Tim Blasi
a187c782aa
feat(dart/transform): Allow absolute urls in templates
...
Allow `templateUrl` to be specified as an absolute `package:` import.
2015-06-11 09:35:17 -07:00
Tim Blasi
950f2a38cd
refactor(dart/transform): Rename parser.dart > ng_deps.dart
...
- Rename the file that defines NgDeps from parser.dart to ng_deps.dart.
- Remove the `Parser` class and replace with the static `NgDeps.parse`
method.
2015-06-11 08:42:34 -07:00
Victor Berchet
f2371487a1
refactor(ProtoRecord): switch to enum
2015-06-11 17:11:34 +02:00
Victor Berchet
6ca81fb98c
refactor(ProtoViewDto): switch to enum
2015-06-11 17:11:34 +02:00
vsavkin
af35ab56a3
fix(life_cycle): throw when recursively reentering LifeCycle.tick
2015-06-11 07:43:14 -07:00
vsavkin
15dab7c5b2
fix(ng_zone): updated zone not to run onTurnDown when invoking run synchronously from onTurnDone
2015-06-11 07:43:13 -07:00
Misko Hevery
2ccc65d7fd
fix: Improve error message on missing dependency
2015-06-10 16:40:38 -07:00
Misko Hevery
7501ad11ca
chore: Define ReflectionCapabilities interface
2015-06-10 16:40:38 -07:00
Victor Berchet
331a051e75
feat(Parser): implement Unparser
...
fixes #1949
closes #2395
2015-06-10 16:24:59 -07:00
gdi2290
92f1af86d8
perf(RouterLink): use hostListeners for click
...
with a `<router-outlet>` and lots of `router-link` you start to see
noticeable lag since we’re not removing the listener
Closes #2401
2015-06-10 16:20:58 -07:00
gdi2290
a6cb86bab3
feat(forms.ts): formInjectables with FormBuilder
...
Closes #2367
2015-06-10 16:13:37 -07:00
Tim Blasi
76beaa2097
refactor(change detect): Clean up change detector test layout
...
- Rename simple_watch_config > change_detector_config
- Add a bunch of comments explaining what's going on with the change
detector tests.
Closes #2468
2015-06-10 16:09:48 -07:00
Victor Berchet
94272af45b
chore: update zone.js to 0.5.1
...
fix #1862
2015-06-10 23:41:45 +02:00
Tim Blasi
ad95601e3c
test(change detect): Port remaining unit tests
...
Move all remaining unit tests for change detectors to exercise Dart
pre-generated change detectors as well as `dynamic` and `JIT` change
detectors.
See #502
2015-06-10 14:11:42 -07:00
Tim Blasi
17c6d6a92d
feat(dart/transform): Add onInit and onCheck hooks in Dart
...
Implement `onInit` and `onCheck` hooks in pre-generated Dart change
detectors. This mirrors the changes made to the JIT change detector in
c39c8ebcd0
.
2015-06-10 14:11:42 -07:00
Kevin Moore
633cf63682
fix: compare strings with StringWrapper.equals
...
Fixes https://github.com/angular/angular/issues/2458
2015-06-10 23:02:48 +02:00
Rado Kirov
92d565848b
fix(shadow_dom): moves the imported nodes into the correct location.
2015-06-10 13:50:12 -07:00
Tim Blasi
ddd5a235c3
test(change detect): Port change detect tests for mode
...
More the change detect tests that exercise various detection modes to
use the Dart pre-generated change detectors in addition to the `dynamic`
and `JIT` change detectors.
See #502
2015-06-09 17:04:50 -07:00
Peter Bacon Darwin
2cc2196140
docs(annotations_impl): fix invalid code blocks
2015-06-09 23:11:08 +01:00
vsavkin
902759e1c7
fix(analzyer): removed unused imports
2015-06-09 12:35:47 -07:00
vsavkin
c564475251
example(forms): removed old forms example
2015-06-09 11:51:17 -07:00
vsavkin
3eff7be9a6
examples(forms): added an example of using template-driven forms
2015-06-09 11:51:15 -07:00
vsavkin
e7e82cbee6
feat(forms): set exportAs to form for all form related directives
2015-06-09 11:51:15 -07:00
vsavkin
73bce40287
feat(forms): export validator directives as part of formDirectives
2015-06-09 11:51:14 -07:00
vsavkin
5fc23caef7
feat(forms): changed forms to capture submit events and fires synthetic ng-submit events
2015-06-09 11:51:13 -07:00
vsavkin
1a4d23742b
feat(forms): added hasError and getError methods to all controls
2015-06-09 11:51:08 -07:00
Rado Kirov
8923103c3b
fix(npm): update scripts and readme for npm packages.
...
Replaces AtScript with Typescript.
Closes #2377
2015-06-09 11:39:08 -07:00
Jeff Cross
f34f8df319
refactor(xhr): move render's xhr implementation to render/
...
The existence of this module in the services/ folder led some to believe xhr
is meant to be a general-purpose http library.
Fixes #2305
2015-06-09 10:28:35 -07:00
Jeff Cross
21568106b1
feat(http): add basic http service
...
This implementation only works in JavaScript, while the Observable transpilation
story gets worked out. Right now, the service just makes a simple request,
and returns an Observable of Response.
Additional functionality will be captured in separate issues.
Fixes #2028
2015-06-09 10:00:04 -07:00
Tim Blasi
0409b4ca49
test(change detect): Port more change detect tests
...
Move more change detector unit tests to exercise the Dart pre-generated
change detectors in addition to `dynamic` and `JIT` change detectors.
See #502
2015-06-09 07:18:48 -07:00
Rado Kirov
83e99fc72d
fix(bundle): makes interfaces.ts non-empty when transpiled.
...
System.js seems detect an empty file as global and choke on exporting
symbols from angular2/angular2 (possibly a bug in system.js).
As temporary measure we make sure that the file has some (fake) runtime
code left.
Closes : #2343
2015-06-08 17:52:25 -07:00
gdi2290
e77710a372
fix(JsonPipe): always transform to json
...
BREAKING CHANGE:
no longer cache ref
2015-06-08 16:22:04 -07:00
Tim Blasi
b6e95bb96e
feat(change detect): Throw on attempts to use dehydrated detector
...
- Modify change detectors to `throw` when attempting to detect changes
on a dehydrated detector.
- Modify `DynamicChagneDetector` to use `null` for the `context` of a
dehydrated detector.
2015-06-08 16:10:41 -07:00
Brian Ford
cd95e078fe
feat(router): add routing to async components
...
Note that this also removes the `components` option from `RouteConfig`.
This functionality will be reintroduced with the more general `//` routing.
See #2329 for more details.
2015-06-08 15:49:56 -07:00
Brian Ford
548f3dd5cc
feat(facade): add isMap method
2015-06-08 15:49:56 -07:00
Tim Blasi
d5195d4097
test(change detect): Port Locals tests to pregenerated cds
...
Move existing unit tests exercising Locals to also test Dart's
pre-generated change detectors.
See #502
2015-06-08 13:27:11 -07:00
Victor Berchet
4d338a4f5c
test(ElementInjector): test that hostInjector has priority over viewInjector
2015-06-08 20:34:44 +02:00
Victor Berchet
6a6b43de07
feat(ElementInjector): throw if multiple directives define the same host injectable
...
relates to #2015
2015-06-08 20:34:44 +02:00
Victor Berchet
309ef0f354
refactor(test): remove explicit calls to flushMicrotasks()
...
flushMicrotasks() is now called at after the fakeAsync callback returns,
see https://github.com/angular/angular/pull/2290
2015-06-08 20:30:49 +02:00
Tim Blasi
81fc657356
refactor(change detect): Remove unnecessary param from tests
2015-06-08 11:21:45 -07:00
Victor Berchet
29c72abcc4
feat(Events): allow a different event vs field name
...
closes #2272
closes #2344
2015-06-08 19:29:49 +02:00
Victor Berchet
79f3f3b456
refactor(Lexer): refactor scanComplexOperator()
2015-06-08 14:46:55 +02:00
Tim Blasi
d1b35f9174
fix(dart/transform): Don't set ReflectionCapabilities over an async gap
...
Update the transformer's `TemplateCompiler` phase to avoid setting
`reflector.reflectionCapabilities`, allowing asynchronous
operations, and restoring the original value, which allows
`reflector.reflectionCapabilities` to get into a bad state.
2015-06-06 17:10:06 -07:00
Misko Hevery
a418397174
fix: corrected var/# parsing in template
...
Closes #2084
2015-06-05 16:22:41 -07:00
Misko Hevery
8d081ea7af
fix: include error message in the stack trace
2015-06-05 16:22:41 -07:00
Alex Eagle
7141c15e65
fix(docs): Working generated angular2.d.ts
...
This requires some hacks, documented in
https://docs.google.com/document/d/1nNebWTiLzz5ePcit_bjZPtaiSIFU4EsQKUlX7LX0c0A/edit
Changes:
- include subtyping info in angular2.d.ts by adding 'extends supertype'
- export missing symbols needed transitively by angular2/angular2
- because of decorator/annotation mismatch, we can't export these to applications.
So I've added a separate angular2.api.ts file to re-export specifically to .d.ts
generation.
- Hack to remove aliases introduced by 'import * as alias' syntax
- Hack to deal with Error still an interface
note that we require users to install the transitive dependencies - this is how TSD works.
2015-06-05 15:33:23 -07:00
Tobias Bosch
8a52375fb8
chore(transformer): add tests for property bindings and multiple executions
2015-06-05 13:11:24 -07:00
Tobias Bosch
87b3b718e3
refactor(render): don’t use a global cache for property setters
...
Related to #2359
2015-06-05 13:11:23 -07:00
Tim Blasi
529805508a
feat(dart/change_detect): Add type to ChangeDetector context
...
Add a type for the `context` field in Dart's pre-generated change
detectors. This requires slight changes to set the dehydrated value of
`context` to `null` rather than `ChangeDetectionUtil.uninitialized()`,
which was its former dehydrated state.
Mirror these chagnes as closely as possible in the
`ChangeDetectionJITGenerator` to allow easier maintenance.
Closes #2070
2015-06-05 12:53:25 -07:00
Tim Blasi
851797aecb
refactor(dart): Run dartfmt 0.1.8
...
Format Dart code using dartfmt 0.1.8. Update pubspec to require
dart_style 0.1.8.
2015-06-05 11:45:36 -07:00
Tim Blasi
dc6e7eb19b
feat(dart/transform): Record Type interfaces
...
To support interface-based lifecycle methods (#2220 ), we need to be able
to query for the `interface`s a class supports. Record implemented
interfaces to allow mirror-less querying at runtime.
Closes #2204
2015-06-04 15:02:12 -07:00
vsavkin
e5419febe4
feat(transformers): updated transformers
2015-06-04 14:14:03 -07:00
vsavkin
69b75b7fd8
feat(view): added support for exportAs, so any directive can be assigned to a variable
2015-06-04 14:14:03 -07:00
vsavkin
4eb8c9b2dd
fix(locals): improved an error message
2015-06-04 14:14:02 -07:00
Tobias Bosch
827841ec5b
refactor(render): add `DomElement`
...
Replaces the multiple arrays of `DomView`
by a single array with `DomElement`s.
Note: this commit does not show a performance regression
(tested against the tree benchmark locally).
2015-06-04 11:44:26 -07:00
Victor Berchet
53694eb64a
feat(FakeAsync): check pending timers at the end of fakeAsync in Dart
...
Made possible with quiver 0.21.4
2015-06-04 09:09:18 +02:00
Victor Berchet
31a3a19dac
doc(Visibility): fix inline docs
2015-06-04 09:09:11 +02:00
Rado Kirov
552985e305
fix(types): parametrize QueryList.
2015-06-03 17:08:55 -07:00
Martin Probst
f999d5a156
chore: move to clang-format 1.0.17.
...
clang-format 1.0.17 substantially improves formatting for fat arrow functions
and array literal detection. It also fixes a number of minor formatting issues.
2015-06-03 15:27:27 -07:00
vsavkin
3baf815d76
feat(forms): added support for status classes
2015-06-03 14:43:46 -07:00
vsavkin
96cadcc29e
refactor(forms): handle dirty/pristine explicitly
2015-06-03 14:43:46 -07:00
Tobias Bosch
5030ffb01c
feat(view): introduce free embedded views
...
Free embedded views are view instances that are created
logically in the same was as views of a ViewContainer,
but their dom nodes are not attached.
BREAKING CHANGE:
- `Renderer.detachFreeHostView` was renamed to
`Renderer.detachFreeView`
- `DomRenderer.getHostElement()` was generalized into
`DomRenderer.getRootNodes()`
2015-06-03 14:42:00 -07:00
Tim Blasi
246151b2f9
test(dart/transform): More change detector unit tests
...
Port some change detector unit tests which formerly ran only on dynamic
& JIT change detection to run for pre-generated Dart change detectors as
well.
2015-06-03 10:37:34 -07:00
Tim Blasi
83f1856d6a
feat(dart/transform): Add support for the safe navigation operator
...
Adds support for ?. to pregenerated Dart Change Detectors.
Closes #791
2015-06-03 10:37:34 -07:00
Ian Riley
fde65c7e88
refactor(angular2/view): Ts'ify view.js
...
Translates angular2/view to TypeScript.
2015-06-03 09:52:37 -07:00
Ian Riley
bae6b91e7d
refactor(angular2/angular2_sfx): Allows no-module integration of Angular2
...
Translates angular2/angular2_sfx to TypeScript in order to allow Angular2 integration without modules.
2015-06-03 09:52:37 -07:00
Ian Riley
2b714df64e
refactor(test/mock): Ts'ify angular2/test/mock
...
Translates the last test directory -- angular2/test/mock -- to TypeScript.
2015-06-03 09:52:37 -07:00
Victor Berchet
c7572ac1f9
feat(fakeAsync): flush the microtasks before returning
...
fixes #2269
2015-06-03 06:48:08 +02:00
vsavkin
ec3a78289f
feat(forms): added touched and untouched to Control
2015-06-02 17:32:41 -07:00
vsavkin
f543834be9
feat(forms): renamed control, control-group into ng-control and ng-control-group
2015-06-02 16:24:08 -07:00
vsavkin
6bef1c4169
feat(forms): changed the selector of TemplatdrivenFormDirective to match <form>
2015-06-02 16:24:08 -07:00
vsavkin
652ed0cf6d
feat(form): implemented an imperative way of updating the view by updating the value of a control
2015-06-02 16:24:07 -07:00
vsavkin
559f54e92b
feat(forms): added ng-model
2015-06-02 16:24:07 -07:00
Jacob MacDonald
17e1d7f117
fix(dartdocs): Hide duplicate exports from guinness.
...
Duplicate exports were breaking dartdoc builds.
Closes https://github.com/angular/angular/issues/2072 .
2015-06-02 16:01:46 -07:00
Tobias Bosch
ba7956f521
fix(render): only look for content tags in views that might have them.
...
Largetable benchmark with `interpolationAttr` and 200 rows / 20 columns:
Time for destroy/create pair dropped from about 1260ms to about 150ms.
Related to #2298 , but does not really fix it as we are still slow
if people are using `<content>`.
Closes #2297
2015-06-02 15:31:07 -07:00
Naomi Black
c2fa4b7191
docs(chore): missing reformats to make clang-format 1.0.15
2015-06-02 15:30:04 -07:00
Naomi Black
d32f58926d
docs(ng-if): fix some missed occurrences of if, for, switch in docs
2015-06-02 15:30:04 -07:00
Naomi Black
6a0fe93ba9
chore(docs): fix another link broken by clang-format
2015-06-02 15:30:03 -07:00
Naomi Black
dc060e8b64
docs(clang): format updates
2015-06-02 15:30:03 -07:00
Naomi Black
b746e0c9f0
docs(docgen): tell dgeni to use ts files and fix some bad links
2015-06-02 15:30:03 -07:00
Ian Riley
1d24e2cf23
fix(Global && src/facade && Protractor): Allows List to be imported.
...
Allows the List type to be imported from 'angular2/src/facade/collection'
2015-06-02 13:11:31 -07:00
Ian Riley
9e36539052
fix(src/reflection && src/test_lib): Fixes bugs that caused benchmarks to fail.
...
Adjusts src/test_lib files to adhere to common TS module practices. Fixes bug with all files that causes benchmarks to fail.
2015-06-02 13:11:30 -07:00
Ian Riley
0602f68ae3
refactor (angular2/test_lib): ts'ifying last of test_lib
...
Translates last .es6 files in angular2/src/test_lib to TypeScript.
2015-06-02 13:11:30 -07:00
Victor Berchet
0b43e3cf32
refactor(lang_spec): Add missing ;s and clang-format
2015-06-02 21:09:38 +02:00
Jeff Cross
ba07f39347
refactor(router): convert to typescript
...
Fixes #2001
2015-06-02 11:06:44 -07:00
Marc Laval
4c8e11a577
fix(ShadowCss): keyframes tests failing in Safari
...
Closes #2283
2015-06-02 19:23:06 +02:00
Victor Berchet
c60091b949
refactor(Compiler): improve the error message on component load error
...
by adding the fetched url.
relates to #1460
2015-06-02 12:59:50 +02:00
Victor Berchet
8811337622
refactor(ElementInjector): add interfaces for strategies
2015-06-02 10:09:39 +02:00
Victor Berchet
921fb9f2ce
refactor(Injector): use TS iodioms
2015-06-02 09:53:11 +02:00
Victor Berchet
e93b5a1d5b
refactor(Injector): add an interface for strategies
2015-06-02 09:53:11 +02:00
gdi2290
db7a1f19ba
feat(render/dom_renderer): DocumentToken use OpaqueToken
...
BREAKING CHANGE:
No longer a `const` string. Now a const OpaqueToken
2015-06-01 16:24:36 -07:00
gdi2290
ef27919f7f
feat(core/compiler): AppViewPool use OpaqueToken
...
BREAKING CHANGE:
No longer a `const` string. Now a const OpaqueToken
2015-06-01 16:24:36 -07:00
gdi2290
c571b2693e
feat(OpaqueToken): now a const constructor
...
BREAKING CHANGE:
now a `const` constructor
2015-06-01 16:24:36 -07:00
PatrickJS
93f464a145
feat(change_detection.ts): export PipeFactory
...
Closes #2245
2015-06-01 16:14:02 -07:00
Tobias Bosch
62a95823e0
fix(selector): support multiple `:not` clauses
...
Fixes #2243
2015-06-01 14:24:19 -07:00
Tim Blasi
22f5925202
fix(facade): Make PromiseWrapper#all semantics equivalent
...
The semantics between ES6 `Promise#all` and Dart's `Future#wait` are
different for values that are not `Promise`/`Future`s. In ES6,
non-`Promise` values are immediately completed to their current value.
In Dart, non-`Future` values cause an error.
Updated Dart's `PromiseWrapper#all` implementation to conform to the ES6
spec.
2015-06-01 07:26:46 -07:00
vsavkin
a9d6fd9afa
feat(forms): implemented template-driven forms
2015-05-30 11:56:00 -07:00
vsavkin
5c53cf6486
fix(fake_async): fixed fakeAsync to throw instead of crashing on cjs
2015-05-30 11:55:17 -07:00
vsavkin
74882c6c38
feat(test): added not.toBeNull
2015-05-30 11:54:10 -07:00
uber5001
6404dd8293
refactor (angular2/src/dom): tsifying angular2/src/dom
...
translates parse5_adapter.cjs to typescript
Closes #2230
2015-05-29 17:01:05 -07:00
vsavkin
f19970a481
feat(transformers): added support for lifecycle events
2015-05-29 16:40:34 -07:00
vsavkin
d523613329
test(di): added a test verifying hierarchical injection
2015-05-29 15:52:46 -07:00
Tim Blasi
000a8e25a2
fix(dart/transform): Fix DirectiveMetadata read tests
2015-05-29 14:56:42 -07:00
Tim Blasi
8a3b0b366f
feat(dart/transform): Generate ChangeDetector classes
...
Use the `ProtoViewDto` created by the render `Compiler` to create a
`ChangeDetectorDefinition`.
From there, generate a subclass of `AbstractChangeDetector` for each
`ChangeDetectorDefinition`.
Run some basic unit tests for the dynamic and JIT change detectors on
pre-generated change detectors.
2015-05-29 14:48:53 -07:00
Jeff Cross
e323c07ab9
refactor(benchpress): convert src and test to typescript
...
Fixes #2007
2015-05-29 14:02:58 -07:00
Tobias Bosch
f9908cd436
feat(test): add element probe
...
Usage: bootstrap the app with the special binding
`ELEMENT_PROBE_CONFIG` from `angular2/debug`.
This will provide a global method `ngProbe(element)` that
will expose a `DebugElement` with directive instances, ... on it.
During tests that use Angular's test injector, the probe is
enabled by default. The `DebugElement ` can be retrieved via the
function `inspectDomElement` of `angular2/debug`. Note
that the `TestComponentBuilder` already returns `DebugElement `s.
Closes #1992
2015-05-29 12:44:21 -07:00
Tobias Bosch
24bc4b66d0
fix(render): don’t store a document fragment as bound element
...
When a template contains bound text nodes as root nodes,
we used to store the document fragment that we got from
cloning `template.content`. However, this fragment will be
empty as soon as the view gets attached. Now we store
`null` instead of the document fragment in this case.
Also groups the 3 cases in `_createView` so they are easier to
understand.
2015-05-29 11:33:23 -07:00
Tobias Bosch
2351896cc0
fix(dom): allow to correctly clone document fragments
2015-05-29 11:33:23 -07:00
Tobias Bosch
307011a96c
fix(dom): `querySelectorAll` should only query child nodes
2015-05-29 11:33:22 -07:00
Tobias Bosch
6f3368ef16
feat(dom): add `setData()` method.
2015-05-29 11:33:22 -07:00
Tobias Bosch
cdf791f0c5
feat(facade): add read/write access to global variables
2015-05-29 11:33:22 -07:00
Tobias Bosch
75578f41e7
feat(view): add `AppViewListener` interface
...
Basic functionality how element probe is hooked into
the system.
2015-05-29 11:33:22 -07:00
Tim Blasi
ffb219fb91
style(dart): Format Dart source with dart_style 0.1.8
2015-05-29 10:42:47 -07:00
Sekib Omazic
eb2784eb81
refactor(core.js): export NgZone
...
Export NgZone so it can be used in applications where large data streams should be processed outside of Angular.
2015-05-29 17:58:32 +02:00
gdi2290
28ee0612cb
feat(router.js): export router injectables
...
Exporting: `RootRouter`, `RouteRegistry`, `BrowserLocation`,
`Location`, and `Pipeline`.
2015-05-29 17:56:00 +02:00
elimach
a80921b45d
fix(binding): unbalanced curly brackets in documentation
2015-05-29 17:54:51 +02:00
Victor Berchet
0db88f34b8
refactor(annotations): stricter types
2015-05-29 11:44:45 +02:00
Victor Berchet
35f0ee510a
refactor(transformer): updates in properties syntax
2015-05-29 11:44:44 +02:00
Victor Berchet
d7df853bde
feat(Directive): convert properties to an array
...
fixes #2013
BREAKING CHANGE:
Before
@Directive(properties: {
'sameName': 'sameName',
'directiveProp': 'elProp | pipe'
})
After
@Directive(properties: [
'sameName',
'directiveProp: elProp | pipe'
])
2015-05-29 11:44:43 +02:00
Victor Berchet
0387221da8
fix(ast): fix the size of a list in _evalListCache
2015-05-29 08:07:43 +02:00
vsavkin
c39c8ebcd0
feat(change_detection): added onInit and onCheck hooks
2015-05-28 16:46:22 -07:00
Tim Blasi
5d2af54730
feat(dart/transform): Improve constant evaluation
...
Use `package:analyzer`'s `ConstantEvaluator` to read from the AST.
This cleanly builds values for us from adjacent strings, interpolations,
etc.
2015-05-28 15:18:22 -07:00
Victor Berchet
a9be2ebf1b
feat: add support for the safe navigation (aka Elvis) operator
...
fixes #791
2015-05-28 23:03:30 +02:00
Victor Berchet
ec2d8cc2c8
feat(binding): throw on binding to a blank alias
...
fixes #2068
2015-05-28 22:37:29 +02:00