Commit Graph

885 Commits

Author SHA1 Message Date
Tim Blasi f89bb8eaf3 Address code review comments 2015-04-16 09:11:03 -07:00
Tim Blasi 0d0b3a35da test(dart/transform): Add unit tests for DirectiveMetadataReader 2015-04-16 09:11:03 -07:00
Tim Blasi cf7bef58b0 feat(dart/transform): Add the DirectiveMetadataReader
Add a class that parses and reads Directive metadata to prepare for
running the Render compiler in the Dart transformer.
2015-04-16 09:11:02 -07:00
Jacob MacDonald c65fd31e86 feat(dart/transform): Detect annotations which extend Injectable or Template.
Create a method that recursively walks imports from an entry point and
determines where classes are registered.

Use this information to determine if a particular annotation implements or
extends Injectable or Template.
2015-04-16 07:17:24 -07:00
Kevin Moore 957384ceeb fix: Fix issues found by Dart analyzer 2015-04-15 20:58:29 -07:00
Marc Laval d3e391d176 chore(build): run render tests in Node
Closes #1358
2015-04-15 19:51:11 -07:00
Bradley Heinz cd1295a823 Update 01_templates.md
Closes #1373
2015-04-15 19:48:34 -07:00
Bradley Heinz 5d302c504e Update 02_directives.md
Closes #1374
2015-04-15 19:48:31 -07:00
vsavkin 68faddbf5c feat(change_detection): updated handling ON_PUSH detectors so they get notified when their bindings change 2015-04-15 16:21:21 -07:00
vsavkin 8c1adabe1c refactor(change_detection): renamed BindingPropagationConfig to ChangeDetectorRef 2015-04-15 12:58:58 -07:00
Tobias Bosch 213dabdceb fix(view): remove dynamic components when the parent view is dehydrated
Also adds a bunch of unit tests for affected parts.

Fixes #1201
2015-04-15 12:53:21 -07:00
Tobias Bosch 6ecaa9aebb feat(change detection): add removeShadowDomChild 2015-04-15 12:53:21 -07:00
Tobias Bosch cb2e646332 fix(tests): create default spys for all methods on a class 2015-04-15 12:53:20 -07:00
Tim Blasi fef1dee7aa fix(dart/transform): Ensure consistent ordering of generated imports
- Linked imports are generated in a consistent order.
- Linked imports are generated immediately after their associated files.
2015-04-15 12:09:51 -07:00
Tobias Bosch c25478380c docs(benchpress): add details about normalized mobile environment. 2015-04-15 10:12:13 -07:00
Misko Hevery e819e97f9a docs: expose more API to public, document QueryList 2015-04-15 05:10:26 +00:00
Jeremy Elbourn f149ae79c6 feat(material): first ng2 material design components 2015-04-14 16:15:35 -07:00
vsavkin f0d0fe0801 refactor(change_detection): cleaned up change_detection.js 2015-04-14 14:34:57 -07:00
Naomi Black d630d5baa5 docs(change_detection): document LifeCycle 2015-04-14 14:16:14 -07:00
Tim Blasi 7cac7c5157 refactor(dart/transform): Correct Dart analyzer warnings
- Fix numerous Dart analyzer warnings we had been ignoring.
- Delete unused `in_progress` dir
2015-04-14 13:41:22 -07:00
Naomi Black 8475c63a6a misc(docs): Edits and additions for Forms and Change Detection 2015-04-14 13:34:29 -07:00
Peter Bacon Darwin 0e3d0fbec6 docs(change_detection): don't annotate exports that are already in public modules
Since `DynamicChangeDetection` and `JitChangeDetection` classes are alreadt in the
public module, they do not need to be annotated with a `@exportAs` tag

Closes #1353
2015-04-14 13:22:41 +01:00
vsavkin 8b97cf1479 cleanup(view): changed ComponentRef to contain ElementRef instead of extending it 2015-04-13 19:30:00 -07:00
vsavkin b5c9f9ed9b cleanup(element_injector): added a missing test 2015-04-13 19:30:00 -07:00
Rado Kirov 3177576ad6 feat(bundle): adds a self-executing dev bundle (SFX). 2015-04-13 18:05:53 -07:00
Yegor Jbanov 3667854a8f refactor(di): move all binding resolution logic into injector.js 2015-04-13 15:06:44 -07:00
Yegor Jbanov c5c1c9e38e feat(docs): more docs on binding resolution 2015-04-13 15:06:44 -07:00
Yegor Jbanov 308823b6ea perf(view): use pre-resolved bindings for child injector init
Creating a child injector from pre-resolved bindings (if any) is an
order of magnitude faster.
2015-04-13 15:06:44 -07:00
Yegor Jbanov c05bad381c perf(benchmark): measure Injector init from resolved bindings 2015-04-13 15:06:44 -07:00
Yegor Jbanov 4a961f4ecb feat(di): provide two ways to create an injector, resolved and unresolved
Add two factory static functions to Injector: resolveAndCreate and
fromResolvedBindings.

We want to avoid resolution and flattening every time we create a new
injector. This commit allows the user to cache resolved bindings and
reuse them.
2015-04-13 15:06:43 -07:00
Yegor Jbanov 6c8398df9b fix(di): refactor bindings to support Dart annotations 2015-04-13 15:06:43 -07:00
keertip 28ba179e31 feat: intiial commit for angular 2 dart analysis
Initial commit for analysis support to Angular 2 Dart
2015-04-13 13:50:29 -07:00
Marc Laval b96e560c8d feat(events): add support for global events
Fixes #1098
Closes #1255
2015-04-13 22:35:36 +02:00
Pawel Kozlowski 7c95cea3a8 chore(bundle): avoid imports in "global" format
If an "empty" file (like angular2/template.js) is imported
it is auto-detected as the one using "global" format by the
system builder. This is incorrect as the entire angular2 build
output is in the ES6 format.

Removing empty import till it has some content.

Closes #1329
2015-04-13 21:24:56 +02:00
Yegor Jbanov 0012caa4d5 perf(benchmarks): measure cost of Injector init with a variety of bindings 2015-04-13 10:02:13 -07:00
Tobias Bosch 8499cf84c3 fix(shadow_dom): redistribute light dom when a dynamic component is attached.
Fixes #1077
Closes #1315
2015-04-13 09:23:52 -07:00
Martin Probst a3decad4c2 feat(build): Use broccoli for ts2dart transpilation. 2015-04-11 16:26:44 -07:00
Alex Eagle 7b790a3369 chore(build): fix check-format 2015-04-11 12:40:05 -07:00
vsavkin 6f8fef4f13 feat(bootstrap): changed bootstrap to return ComponentRef 2015-04-10 18:14:59 -07:00
Naomi Black e295940833 cleanup(docs): Edited API docs 2015-04-10 18:02:10 -07:00
Tobias Bosch 6ce085a21a feat(benchmark): make view cache a parameter to the tree benchmark 2015-04-10 16:57:46 -07:00
Tobias Bosch e34146fc14 fix(view_factory): fix caching of views
Previous implementation had bugs, and did not cache per ProtoView.
2015-04-10 16:57:45 -07:00
Kevin Moore 5ce5a87abe style: add more type info to Dart BrowserAdapter 2015-04-10 23:34:06 +00:00
Jeremy Elbourn afe5465862 add return types for indexOf and lastIndexOf
closes #1277
2015-04-10 23:34:05 +00:00
Victor Berchet 678d541da7 refactor(compiler): add control.ignoreCurrentElement() to skip the current element
relates to #808
2015-04-10 23:34:05 +00:00
Peter Bacon Darwin b5002fb46b docs(test_lib/test_injector): fix invalid jsdoc type
chore(doc-gen): capture docs for modules from comments

Closes #1258

docs(*): add module description jsdoc tags
docs(*): add @public tag to public modules
chore(doc-gen): fix overview-dump template
The template was referencing an invalid property
chore(doc-gen): use `@exportedAs` and `@public` rather than `@publicModule`

This commit refactors how we describe components that are re-exported in another
module. For example the "public" modules like `angular/angular` and `angular/annotations`
are public but they only re-export components from "private" modules.

Previously, you must apply the `@publicModule` tag to a component that was to be
re-exported. Applying this tag caused the destination module to become public.

Now, you specify that a module is public by applying the `@public` tag and then
you can "re-export" components to other modules by applying the `@exportedAs`
giving the name of the module from which the component will be re-exported.
tag. This tag can be used multiple times on a single component, allowing the
component to be exported on multiple modules.

docs(*): rename `@publicModule` to `@exportedAs`

The `@publicModule` dgeni tag has been replaced by the `@exportedAs`
dgeni tag on components that are to be re-exported on another module.

Closes #1290
2015-04-10 22:00:41 +00:00
Tim Blasi 82127571b5 feat(dart/transform): Use the Dart transformer for benchmarks
Remove explicit generation of reflection information in benchmark code
and generate it with the transformer.
2015-04-10 14:01:55 -07:00
Tim Blasi f6e9d1f857 feat(dart/transform): Fix handling of Dart keywords
Use `package:analyzer`'s list of Dart keywords to ensure we are properly
reporting usages of Dart keywords as runtime errors.
2015-04-10 13:43:11 -07:00
Tim Blasi 2cab7c79c3 feat(dart/transform): Allow multiple transformer entry points
- Allow the user to specify multiple entry points to an app.
- Allow the Angular 2 transformer to run without explicit entry points to
generate necessary setters & getters on built-in directives like `For`
and `If`.

Closes #1246
2015-04-10 13:41:26 -07:00
Tim Blasi bba849909c fix(dart/transform): Gracefully handle log calls before init
- Lazily create and use a logger that prints instead of `throw`ing.
- Use this logger in unit tests.
2015-04-10 13:41:26 -07:00
Tim Blasi cac74c73e1 feat(dart/transform): Add stub implementations to Html5LibAdapter
Stub out some methods used in the `CompilerPipeline`.
2015-04-10 13:41:26 -07:00
Tim Blasi f375dbd013 feat(dart/transform): Mark Compiler as Injectable
Necessary to allow runtime access via the `Injector`
2015-04-10 13:41:26 -07:00
Pawel Kozlowski bf7933714a chore(rename): rename View and Template concepts for #1244 2015-04-10 12:00:37 -07:00
Pawel Kozlowski 7e2c04e805 feat: add class directive to a list of directives
Closes #1292
2015-04-10 18:33:51 +02:00
David-Emmanuel Divernois 8fa1539bac feat(keyEvents): support for <div (keyup.enter)="callback()">
This commit adds a plugin for the event manager, to allow a key name to
be appended to the event name (for keyup and keydown events), so that
the callback is only called for that key.

Here are some examples:
 (keydown.shift.enter)
 (keyup.space)
 (keydown.control.shift.a)
 (keyup.f1)

Key names mostly follow the DOM Level 3 event key values:
http://www.w3.org/TR/DOM-Level-3-Events-key/#key-value-tables

There are some limitations to be worked on (cf details
in https://github.com/angular/angular/pull/1136) but for now, this
implementation is reliable for the following keys (by "reliable" I mean
compatible with Chrome and Firefox and not depending on the keyboard
layout):
- alt, control, shift, meta (those keys can be combined with other keys)
- tab, enter, backspace, pause, scrolllock, capslock, numlock
- insert, delete, home, end, pageup, pagedown
- arrowup, arrowdown, arrowleft, arrowright
- latin letters (a-z), function keys (f1-f12)
- numbers on the numeric keypad (but those keys are not correctly simulated
by Chromedriver)

There is a sample to play with in examples/src/key_events/.

close #523
close #1136
2015-04-10 13:29:27 +02:00
vsavkin f45281a10a feat(view): generalized loading of dynamic components 2015-04-09 22:15:42 -07:00
Rado Kirov e9f70293ac feat(query): adds initial implementation of the query api.
Queries allow a directive to inject a live list of directives of a given
type from its LightDom. The injected list is Iterable (in JS and Dart).
It will be Observable when Observables are support in JS, for now it
maintains a simple list of onChange callbacks API.

To support queries, element injectors now maintain a list of
child injectors in the correct DOM order (dynamically updated by
viewports).

For performance reasons we allow only 3 active queries in an injector
subtree. The feature adds no overhead to the application when not
used. Queries walk the injector tree only during dynamic view
addition/removal as triggered by viewport directives.

Syncs changes between viewContainer on the render and logic sides.

Closes #792
2015-04-09 19:07:19 -07:00
vsavkin 61cb99ea42 refactor(change_detection): removed directive and binding mementos 2015-04-09 18:56:19 -07:00
vsavkin 5408a9a72d cleanup(change_detection): removed dead code 2015-04-09 18:56:19 -07:00
Martin Probst 22c1a0d030 fix(benchmarks): Stop working around a Traceur bug. 2015-04-09 18:03:27 -07:00
vsavkin a027912891 cleanup(change_detection): fixed ChangeDetector interface 2015-04-09 17:30:04 -07:00
vsavkin 3bdf669ddf cleanup(change_detection): removed dead code 2015-04-09 17:30:04 -07:00
Alex Eagle b94b04c074 chore(build): Migrate remaining tasks under build.js.dev to broccoli. 2015-04-09 14:09:38 -07:00
vsavkin 69c3bff086 feat(change_detection): updated change detection to update directive directly, without the dispatcher 2015-04-08 22:14:50 -07:00
Tobias Bosch 50098767fc refactor(render): use render layer fully
Introduces angular2/src/core/compiler/ViewFactory which
extracts ProtoView.instantiate and replaces ViewPool.

Note: This is a work in progress commit to unblock other commits.
There will be follow ups to add unit tests, remove TODOs, …
2015-04-08 20:51:31 -07:00
Pawel Kozlowski 41262f4265 feat(Ruler): introduce Ruler service
Closes #1089

Closes #1253
2015-04-08 11:04:42 +02:00
Tobias Bosch ca958464c4 refactor(render): create and store render ProtoViewRef in every app ProtoView
Needed to change Renderer.mergeChildComponentProtoViews to not create
new ProtoViews to be able to deal with cyclic references.

This commit is part of using the new render layer in Angular.
2015-04-07 20:27:25 -07:00
Tim Blasi 42c0171b40 chore(dart/transform): Create targets for serving transformed Dart code
- Allow pub (build|serve) to specify mode
- Update pubbuild.js & pubserve.js to allow the caller to provide a `mode` value.
- Update settings to allow the di benchmark to be transformed to run statically.
2015-04-07 10:57:01 -07:00
John Arstingstall b7eea4f577 docs(directives): add # to for directive microsyntax example 2015-04-07 08:44:32 +02:00
vsavkin 9c62b5867e benchmark(change_detection): added a new set of benchmarks measuring updating properties 2015-04-06 18:13:20 -07:00
Harry Terkelsen 2560af731a refactor(dart): use Map instead of HashMap
Closes #1202
2015-04-06 17:16:54 +00:00
Victor Berchet 86211eb5f0 doc(directives): add inline documentation
Closes #1240
2015-04-06 17:11:23 +00:00
Pawel Kozlowski a3387b7f48 fix(di): allow injecting static attrs without type annotations
Closes #1226
2015-04-06 12:33:37 +02:00
Victor Berchet 94a48e8640 test(VmTurnZone): provide a stub VmTurnZone for CJS tests 2015-04-06 10:30:17 +02:00
Victor Berchet d8aeb40b49 reafactor(XHR): rename XHRMock to MockXHR for consistency 2015-04-06 10:30:16 +02:00
Victor Berchet 52c55d0ee8 test: convert to using TestBed 2015-04-06 10:30:16 +02:00
Victor Berchet 438c2b31e4 test(TestBed): initial implementation 2015-04-06 10:30:16 +02:00
Victor Berchet 57e308dd46 test(MockTemplateResolver): allow directive overriding 2015-04-06 10:07:50 +02:00
Gerd Jungbluth c922b5a112 docs(annotations): fix some typos, align docs with code
Closes #1227
2015-04-04 12:23:01 +02:00
PatrickJS d552303cd5 docs(02_directives.md): foreach -> for
Closes #1235
2015-04-04 10:32:53 +02:00
Tobias Bosch 1d4d18d9db refactor(render): user render compiler 2015-04-03 23:41:00 -07:00
Patrick 069bbf3ed0 docs(02_directives.md): Fixes variable name for visibility in Components example 2015-04-03 14:18:15 -07:00
Kevin Moore d77f409093 chore: analyzer fixes for Dart transformer 2015-04-03 14:18:14 -07:00
Andrew 25c709c58e fix(angular2): export PrivateComponent{Loader,Location} in angular2/core 2015-04-03 14:18:14 -07:00
Tim Blasi bc909d1d0f refactor(dart/transform): Minor renames
Rename `setupReflection` => `initReflector`
Rename `TemplateComplier` => `TemplateCompiler`

Closes #1180
2015-04-03 13:16:24 -07:00
Tim Blasi a6736ff9f2 perf(change detection): Assign this.locals in change detector ctor
Set `this.locals = null;` in the ctor of generated change detector
classes to prevent the class "shape" from changing on `hydrate`.
2015-04-03 12:23:47 -07:00
Alex Eagle 894a0f0ee5 chore(ts): duplicate the .es6 files in the facade directory to TypeScript.
Adds a gulp task which builds the .ts files (in the cjs build only).
The new files have extension .ts since they are now valid typescript.
Unfortunately until Typescript can emit System.require, we have to keep the old .es6 version
so traceur works inside the Karma preprocessor. This should be fixed soon.
2015-04-03 09:35:06 -07:00
vsavkin abea92af59 refactor(change_detection): call onChange from the change detector 2015-04-02 21:22:42 -07:00
Misko Hevery 86dc3e5b07 docs: create public API surface
Closes #1181
2015-04-02 23:23:39 +00:00
Tobias Bosch c1aa65239e refactor(render): move services to render folder
property_setter_factory
selector
style_inliner
style_url_resolver
shadow_css
2015-04-02 14:40:49 -07:00
Tobias Bosch be5ccf6957 refactor(render): delete copies files so we add them via moves 2015-04-02 14:24:55 -07:00
Marc Laval 90d9a1df3f fix(IE11): first fixes
Closes #1179
2015-04-02 22:06:21 +02:00
Victor Berchet 1037cef22e refactor(render): misc minor fixes 2015-04-02 20:50:05 +02:00
Tim Blasi 09948f4403 feat(dart/transform): Add a `di` transformer
Add a transformer for `di` which generates `.ng_deps.dart` files for all
`.dart` files it is run on. These `.ng_deps.dart` files register
metadata for any `@Injectable` classes.

Fix unit tests for changes introduced by the di transformer.

When using `pub (build|serve) --mode=ngstatic`, we will also generate
getters and setters, parse templates, and remove import of `dart:mirrors`
in the Angular transform. Because this is still relatively immature, we
use the mode to keep it opt-in for now.

Closes #700
2015-04-02 11:06:33 -07:00
Tim Blasi 788461b7e2 feat(di): Mark objects @Injectable
Allow `PrivateComponentLoader`, `Testability`, and `TestabilityRegistry` to be injected.
2015-04-02 11:02:26 -07:00
Tobias Bosch 4f56628566 refactor(render): move services to right location
core/compiler/events -> render/dom/events
core/compiler/url_resolver -> services/url_resolver
core/compiler/xhr/* -> services/*
2015-04-02 10:35:27 -07:00
Tobias Bosch bcbf1ccc68 refactor(render): remove duplicate files to prepare for move
Remove first so Github shows the files as being moved instead of copied and deleted.
2015-04-02 10:35:27 -07:00
Pawel Kozlowski ae30d7ba40 fix(di): allow injecting event emitter fns without specifying type annotation
Fixes #965

Closes #1155
2015-04-02 19:07:49 +02:00
Marc Laval 1d79d534d9 test(selector): add tests with multiple attributes
Fixes #1025
Closes #1117
2015-04-02 18:06:44 +02:00
Tobias Bosch 47542b0cb0 fix(build): don’t read out chrome perflogs during e2e tests
We do this as we are seeing flakes in Chrome with ECONNREFUSED.

Also reuses the same browser window.

Also reenables the infinite scroll benchmark

Closes #1137
2015-04-01 17:09:26 -07:00
Tobias Bosch 6c60c3e547 feat(render): add initial implementation of render layer 2015-04-01 16:50:22 -07:00
Julie Ralph e81e5fb2b9 feat(testability): add an initial scaffold for the testability api
Make each application component register itself onto the testability
API and exports the API onto the window object.
2015-04-01 13:54:06 -07:00
Alex Eagle f68cdf3878 chore(ts): introduce some TypeScript type declarations.
This uses tsd to fetch the typings from another git repo. I've forked the DefinitelyTyped repo because some typings we use are not available upstream.
We should probably fork it in the Angular org, so everyone on the team has commit access to our DefinitelyTyped fork.
2015-04-01 12:01:45 -07:00
vsavkin 514ba54282 feat(change_detection): added changeDetection to Component 2015-03-31 20:54:44 -07:00
Alex Eagle a11f683e7b chore(ts): Don't mask the Regexp builtin.
Doing so makes it impossible to compile with TypeScript, since it conflicts with the shape of the Regexp global var defined in the standard lib.
2015-03-31 19:20:21 -07:00
vsavkin b65b145122 refactor(view): refactored DirectiveMemento to expose properties in a consistent way 2015-03-31 18:26:58 -07:00
vsavkin 982bb8b01d fix(forms): fixed a directive selector 2015-03-31 17:45:38 -07:00
Martin Probst eb7b7581ca fix(build): Actually code in the subset of JS that Traceur-Dart supports. 2015-03-31 16:08:49 -07:00
Martin Probst 54a4e4a67c fix(dart): The Traceur dart transpiler doesn't support shorthand syntax. 2015-03-31 13:17:56 -07:00
Pawel Kozlowski aca4604879 feat(CSSClass): support binding to classList
Closes #876
2015-03-31 21:53:24 +02:00
Victor Berchet 48811cd805 doc(lifecycle): minor fixes 2015-03-31 21:12:37 +02:00
Martin Probst 136f64f4ac fix(dart): don't instantiate abstract directive.
Directive is an abstract class, so it should not
be instantiated directly in tests.
2015-03-31 11:38:59 -07:00
Jeff Cross 123ee8e06f feat(dom): add replaceChild to DOM adapter 2015-03-31 09:54:41 -07:00
Jeff Cross a55efbd8b8 feat(perf): add Angular2 implementation of largetable benchmark from AngularJS 1.x 2015-03-31 09:54:41 -07:00
Jeff Cross 7bf9525353 fix(benchmark_util): remove strict equality check from getStringParameter
Transpiled dart code was using identical() method to compare, which checks reference
equality, even for strings.
2015-03-31 09:54:41 -07:00
Naomi Black 3915e1b242 docs(annotations): Added new text 2015-03-30 17:19:58 -07:00
Tim Blasi ed5975d3e5 test(dart/transform): Add unit tests for url-linked templates
Test expression and method generation from url-linked templates.
2015-03-30 14:49:31 -07:00
Tim Blasi 1a788e6b0d feat(dart/transform): Parse `url` values in `Template`s
When a `Template` annotation declares a `url` value, parse it to
generate `getter`s, `setter`s, and `method`s which will it needs to
access reflectively.
2015-03-30 14:49:31 -07:00
Marc Laval d822793229 fix(test): add a test for @PropertySetter on a class with a dash
Closes #1113
Fixes #1099
2015-03-28 16:17:43 +01:00
Sekib Omazic b46d0bc48c docs(annotations): fix typo, align docs with code
Closes #1045
2015-03-28 15:39:50 +01:00
laiso 65320126c2 docs(directives): fix HTML in an example
Closes #1115
2015-03-28 15:37:11 +01:00
Tobias Bosch 8c5d9d372f fix(build): publish docs as well and correct bench press docs 2015-03-27 16:47:52 -07:00
Tobias Bosch 8598c87ef4 docs(bench press): add initial docs 2015-03-27 16:16:35 -07:00
Tobias Bosch 33bfc4c24a feat(bench press): replace microIterations with microMetrics 2015-03-27 16:16:35 -07:00
Julie Ralph 3afb744e77 chore(ci): reorganize e2e/perf test running
Now, running protractor configs by default only runs e2e tests. If
the --benchmark flag is added, it runs only the perf tests, and always
restarts the browser in between tests. If the --dryrun test is added,
the perf tests are run only once.

This should make it easier to run perf tests versus example e2e tests,
and help stabilize the travis build because perf tests always
run with a clean browser.
2015-03-27 13:29:21 -07:00
vsavkin e92918bbfe feat(change_detector): split light dom and shadow dom children 2015-03-27 13:26:37 -07:00
vsavkin 723e8fde93 feat(change_detection): added a directive lifecycle hook that is called after children are checked 2015-03-27 13:26:36 -07:00
vsavkin 6b985d56a5 cleanup(forms): added missing type annotations
Closes #1054
2015-03-27 11:30:39 -07:00
Victor Berchet c8385ad998 refactor(cd): remove dead code 2015-03-27 16:59:23 +01:00
Caitlin Potter 9d21a6f40d chore(package.json): upgrade traceur to v0.0.87
Fix in source-map test to follow through the sourcemap chain.
2015-03-26 18:37:03 -07:00
vsavkin d304f41197 docs(core): improved docs on directive lifecycle 2015-03-26 18:18:25 -07:00
vsavkin 8d85b839b6 feat(change_detection): pass binding propagation config to pipe registry 2015-03-26 16:57:04 -07:00
Pawel Kozlowski 5306b6dd0c fix(change_detection): expose values when detecting changes in key-value pairs
Fixes #1118

Closes #1123
2015-03-26 21:18:14 +01:00
vsavkin b09624024b example(forms): added a example of using forms 2015-03-26 11:36:14 -07:00
Pawel Kozlowski edc3709451 fix(ElementBinderBuilder): properly bind CSS classes with "-" in their names
Fixes #1057

Closes #1059
2015-03-26 19:25:31 +01:00
Rob Wormald e706f3477b Remove invalid super() call
Unless I'm missing something?
2015-03-26 11:10:39 -07:00
Victor Berchet 878fce6482 fix(ts): ts doesn't like ";;" 2015-03-26 17:32:48 +01:00
vsavkin b02bd65871 feat(forms): made forms works with single controls 2015-03-26 07:48:17 -07:00
vsavkin ee36aaf163 fix(tests): fixed a broken test 2015-03-26 07:46:26 -07:00
vsavkin ff84506bd5 feat(forms): added support for arrays of controls 2015-03-26 07:43:25 -07:00
Marc Laval 0ae33b7e3c refactor(compiler): factorize common util code dash <-> camel
Closes #1114
Fixes #1097
2015-03-26 15:22:35 +01:00
Marc Laval b1dc6239ef feat(core): @Attribute annotation
Closes #1091
Fixes #622
2015-03-26 10:51:44 +01:00
Victor Berchet 3ec837bfdb test(di): Add a test for sync binding + resolved async dependency 2015-03-26 08:38:29 +01:00
Alex Eagle 9a0a2e319c chore(ts2dart) remove extra semi
This breaks our ts2dart transpilation.
2015-03-25 17:06:47 -07:00
Martin Probst a0d86ac2bb chore(ts2dart): ts2dart doesn't support mixed typed/untyped var decl lists. 2015-03-25 16:41:33 -07:00
Yegor Jbanov 99045b2f6a refactor: update Dart package dependencies 2015-03-25 15:54:12 -07:00
Marc Laval 58dd75a1c8 feat(compiler): Add support for setting attributes to Component host element
Fixes #1008
Fixes #1009
Closes #1052
2015-03-25 17:32:07 +01:00
Misko Hevery f995b07876 docs: annotations edits 2015-03-24 23:28:24 +00:00
Victor Berchet 101a4aa3cf feat(PrivateComponentLoader): Explicit error message when loading a non-component
fixes #1062
2015-03-24 22:11:41 +01:00
Victor Berchet 65d759316b fix(PrivateComponentLoader): add the loader to the app injector
fixes #1063
2015-03-24 22:10:26 +01:00
vsavkin 19c1773133 feat(forms): added an observable of value changes to Control 2015-03-24 13:45:47 -07:00
vsavkin 9b3b3d325f feat(facade): added support for observables 2015-03-24 13:45:39 -07:00
vsavkin f8e7a37c0d fix(view): fixed view instantiation to use the component template's change detector when creating BindingPropagationConfig 2015-03-24 07:49:28 -07:00
Victor Berchet aab084866c doc(test): add a comment on why tests are disabled 2015-03-24 09:52:41 +01:00
Nick Van Dyck 0e61a86763 docs: annotations 2015-03-24 00:42:58 +00:00
vsavkin 47c1a0f381 feat(forms): added value accessor for input=text 2015-03-23 08:53:27 -07:00
vsavkin 514529b5d9 refactor(formed): changed forms to use event and property setters instead of NgElement 2015-03-23 08:52:54 -07:00
vsavkin a12dc7d75a refactor(forms): wrapped all validators into the Validator class 2015-03-23 08:50:56 -07:00
Marc Laval 41b53e71e1 feat(selector): support , for multiple targets
Fixes #867
Closes #1019
2015-03-23 10:06:33 +01:00
Pawel Kozlowski 0fb9f3bd6c fix(ElementBinderBuilder): properly bind to web component properties
Fixes #776

Closes #1024
2015-03-22 14:14:36 +01:00
Pawel Kozlowski 81f3f32217 refactor(DirectiveParser): remove checks for missing directives
Based on the discussion in #776 we can't reliably check if a given
element has a particular property at the compilation time. As such
the existing algorithm detecting "missing" directives can't be used.

We need to see if there is a different / better algorithm or maybe
those checks need to be moved later in the process (runtime). Leaving
integration tests in place (disabled) so we can come back to the
topic after unblocking the situation.

This commit effectivelly reverts 94e203b9df
2015-03-22 14:14:36 +01:00
Tim Blasi b35f288794 refactor(dart/transform): Use package:guinness in tests
`guinness` is a Dart port of Jasmine. Since the rest of Angular 2 uses
Jasmine, use it for the transformer too.

Closes #8

Closes #1037

Closes #1000
2015-03-21 15:18:15 -07:00
Tim Blasi 4e82cc0861 refactor(dart/transform): Test `directive_linker` as a unit
Formerly, it was tested only as a piece of the transformer pipeline. Add
its own directory and test the linker on its own.
2015-03-21 15:18:15 -07:00
Tim Blasi c735644c57 refactor(dart/transform): Minor logging changes
Enable easier testing by providing a null log implementation and a way
to use it.
2015-03-21 15:18:15 -07:00
Tim Blasi 5d479fa0ae refactor(dart/transform): Remove `ngData`
Now that we have `Parser`, `ngData` is redundant & unnecessary.
2015-03-21 15:18:15 -07:00
Tim Blasi 8baedca972 style(dart/transform): Remove `src` from library directives
Conform to Angular 2 style by removing `src` from library directives.
Completed with:
```
find -name "*.dart" | xargs sed -i -e 's!library\(.*\)src\.\(.*\)!library \1\2!'
```

Closes #1005

Closes #1038
2015-03-21 14:55:11 -07:00
Marc Laval 02aa8e7945 feat(compiler): support bindings for any attribute
Closes #1029
2015-03-21 14:55:11 -07:00
Victor Berchet ee523efcb4 feat(ShadowCss): Support the new deep combinator syntax >>>
fixes #990

ref http://dev.w3.org/csswg/css-scoping-1/#deep-combinator

Closes #1028
2015-03-21 14:55:11 -07:00
David-Emmanuel Divernois bd48c927d0 fix(ViewContainer) removeChild called with null parent
In view_container.js, templateElement.parentNode can be null
when two template tags are nested in one another.
Accessing the parent node through view.nodes[0].parentNode fixes
the problem.

closes #997

Closes #999
2015-03-21 14:55:10 -07:00
gdi2290 b61b8d60b7 refactor(forEach): change to for-of with iterable
rename: foreach -> for
rename: array -> iterable
update: DartParseTreeWriter
update: naive_infinite_scroll
update: todo
fix: tests in foreach_spec

Closes #919
2015-03-21 14:19:21 -07:00
Nick Van Dyck f1fca5abb6 (docs) decorator events property
As from what i understand shouldn't the event property rather be events: https://github.com/angular/angular/blob/master/modules/angular2/src/core/annotations/annotations.js#L161

Closes #1018
2015-03-21 18:26:13 +00:00
Matt Follett 045ce3c77a Fix which dependency is injected w/ current elem.
Docs for the "Injecting a directive from the current element" indicate that having a dependency of `dependency: Dependency` should cause the current element's dependency to be injected, but then uses the ID value from the parent element in the example.

Closes #1032
2015-03-21 18:14:43 +00:00
Misko Hevery f822066e2a docs: annotations 2015-03-21 18:05:12 +00:00
Marc Laval 2ff2ce3c6c refactor(test_lib): remove IS_NODEJS
Closes #1015
2015-03-20 15:50:05 +01:00
Marc Laval ab5ed6f2ec chore(test): clean tests of if directive
Closes #1017
2015-03-20 15:48:55 +01:00
vsavkin 8a10edec01 feat(forms): added pristine and dirty 2015-03-19 14:36:21 -07:00
Misko Hevery 38b96ed746 docs: annotations 2015-03-19 18:21:52 +00:00
vsavkin 906fba4fab fixed imports 2015-03-19 10:52:16 -07:00
vsavkin d220b6a2a4 test(forms): added a test checking support for select 2015-03-19 10:19:14 -07:00
vsavkin f42e6337b7 feat(forms): added support for textarea 2015-03-19 10:19:13 -07:00
Misko Hevery 81312e4b3e docs: annotations 2015-03-19 16:56:52 +00:00
Tim Blasi 08b56e1c53 feat(dart/transform): Add simple ParseTemplates step
Generate methods in the ParseTemplates step.
Add a test for inline template method generation.
2015-03-19 08:05:44 -07:00
Tim Blasi b3fa1fa4fa feat(dart/transform): Add simple ParseTemplates step
Adds a step that parses `inline` Template values to generate getters and
setters.
2015-03-19 07:06:51 -07:00
Tim Blasi 5d502d4093 feat(dart/transform): Implement `Html5LibDomAdapter` methods.
Adding support for some additional `DomAdapter` methods necessary to run
`Complier` in the Dart transformer.
2015-03-19 07:06:51 -07:00
Pawel Kozlowski e0710c4613 fix(PropertyBindingParser): detect bindings using full attribute name
Fixes #1001

Closes #1004
2015-03-18 21:52:15 -07:00
Patrice Chalin 376bdf4dc7 fix(bootstrap): report error on bootstrapping non-Component directive
Fixes #951. Test case added to exercise new error reporting. Also added
extra test for when Template is missing.

Closes #961
2015-03-18 21:51:46 -07:00
Pawel Kozlowski a35cc27781 fix(PropertyBindingParser): properly parse event bindings as actions
Fixes #981

Closes #987
2015-03-18 19:09:59 +01:00
Tim Blasi 014a28fef0 fix(examples): Fix type registration in hello_world
Fixing `registerType` call for `Content` in index_static.js.

Closes #991
2015-03-17 22:13:07 -07:00
Tim Blasi 153cee1244 feat(di): Modify hello_world to use @Injectable
Mark `GreetingService` as available to `Injector`s.

Closes #986
2015-03-17 22:12:47 -07:00
Tim Blasi 57723e1354 feat(di): Add the `@Injectable` annotation to `Compiler`
Mark `Compiler` and its dependencies as available to the `Injector`.
2015-03-17 22:12:47 -07:00
Tim Blasi b656f63430 feat(di): Add the `@Injectable` annotation
Add an annotation marking a class as available to `Injector`s.
2015-03-17 22:12:47 -07:00
Marc Laval a46af9c41c feat(build): check circular depencies in Node.js
Closes #980
2015-03-17 22:12:26 -07:00
Tim Blasi d10df7de44 style(dart/transform): Rename .ngDeps.dart => .ng_deps.dart
Update to conform with file naming conventions.

Closes #975
2015-03-17 22:12:08 -07:00
PatrickJS 91398c3425 docs(application.js): ensure bootstrap promise,
so people using something like systemjs won't break the promise chain and at the same time shows that it's a promise

```es6
Promise.all({
  app1: System.import('app1').then(module => module.main()),
  app2: System.import('app2').then(module => module.main()),
  app3: System.import('app3').then(module => module.main())
})
.then(function(injectors) {
  console.log('dem injectors', injectors);
});
```

Closes #967
2015-03-17 22:11:26 -07:00
Pawel Kozlowski 59a1f836a2 fix: allow creation of var with camelCased names
Closes #957
2015-03-17 21:39:26 -07:00
Victor Berchet c6893aceed perf(DirectiveDependency): iterate only once over Dependency properties
Closes #918
2015-03-17 21:24:02 -07:00
Nick Van Dyck 6fe294ff2b (docs) decorator events typo?
Ok I'm not sure (trying to understand angular2) but according to what i can see. Shouldn't the decorator event property be events. Please correct me if I'm wrong :p
2015-03-17 17:10:47 -07:00
Marc Laval 46b03a524e feat(test): more tests in Node.js 2015-03-17 16:58:58 -07:00
vsavkin 99f2d7faf6 removed circular deps so tests run on node 2015-03-17 16:31:37 -07:00
vsavkin b92d16c08e cleanup(change_detection): removed an unused method 2015-03-17 15:23:59 -07:00