Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
aabaa98
refactor(forms): place all shared logic of forms and models into NgCo…
matsko Feb 11, 2014
0b88d2e
fix(ngShow): Add/remove ng-hide class instead of ng-show class
bgourlie Feb 6, 2014
15e8ef2
chore(style): code cleanup
vicb Feb 7, 2014
a33acc0
chore(style): code cleanup
vicb Feb 7, 2014
06d6f28
refactor(http): remove a now useless workaround
vicb Feb 7, 2014
e703bd1
feat(ngModel): Treat the values of number and range inputs as numbers
teropa Feb 8, 2014
3f22b46
test(NgForm): Regression test for #459.
bgourlie Feb 11, 2014
c1646dc
chore(cleanup_todo): Clean-up the TODO sample.
Feb 11, 2014
f7b1cf5
chore(comments): Terminate comment with period.
Feb 11, 2014
d099db5
fix(package.json): add repo, licenses and switch to devDependencies
chalin Feb 11, 2014
ce6e58f
chore(compiler): remove unused, expired code
matsko Feb 11, 2014
89f06bb
refactor(forms): remove _NgModelValidator in favor of using a shared …
matsko Feb 11, 2014
16906a4
chore(documentation-generation): prepare for transition from dartdoc …
chalin Feb 12, 2014
b59f744
chore(test): remove accidental ddescribe
mhevery Feb 12, 2014
e2a00ab
fix(generator): remove invalid sort on elements
chirayuk Feb 12, 2014
eaaa337
docs(contributing): add developer docs explaining how to setup and ru…
chalin Feb 11, 2014
c75202d
feat(forms): provide support for reseting forms, fieldsets and models
matsko Feb 12, 2014
5218539
chore(style): clean up indentation.
mhevery Feb 12, 2014
8fc2c0f
fix(ng-value): Add ng-value support for checked/radio/option
mhevery Feb 13, 2014
9a1ef31
fix(doc-gen): dartbug.com/16752
mhevery Feb 13, 2014
f34e0b3
fix(ngModel): ensure validation occurs when the model value changes u…
matsko Feb 13, 2014
4bf9447
feat(forms): generate ng-submit-valid / ng-submit-invalid CSS classes…
matsko Feb 13, 2014
d0e25b7
chore(style) clean up warnings
kasperl Feb 14, 2014
dcce198
chore(perf): fix perf
pavelgj Feb 14, 2014
f261dcd
chore(doc): delete duplicate * - [ng-blur] comment
Feb 14, 2014
951fa17
fix(scope): Use Iterable instead of List
saeimn Feb 14, 2014
b723ade
doc(developer): Update the developer guide with setup experiences.
codelogic Feb 15, 2014
b5e4511
fix(ng-attr): remove camel-cased dom attributes
technohippy Feb 14, 2014
1acb44d
refactor(pub): Simplify support for pub transformers
Feb 10, 2014
f5668e3
chore(analyzer): update version number
Feb 8, 2014
a630487
fix(ng-pluralize): use ${..} to interpolate
technohippy Feb 15, 2014
cf0160b
fix(ngModel): process input type=number according to convention, usin…
chalin Feb 16, 2014
cec3eda
fix(DateFilter): fix a wrong type
technohippy Feb 18, 2014
8f020f9
fix(compiler): support filters in attribute expressions
pavelgj Feb 18, 2014
3e21486
style(ng-repeat): fix a typo shalow -> shallow (fix #581)
vicb Feb 19, 2014
abffb60
style(ng-repeat): code cleanup
vicb Feb 19, 2014
1f85a8c
fix(di): Upgrade dependency of package di preventing problems with da…
Feb 19, 2014
5766a6a
fix(ngModel): ensure checkboxes and radio buttons are flagged as dirt…
matsko Feb 19, 2014
426e211
chore(release): release v0.9.8
chirayuk Feb 19, 2014
bc4a186
chore(perf): Get watch_group_perf running on Dart2js
mhevery Jan 30, 2014
3bde820
feat(scope2): Basic implementation of Scope v2
mhevery Jan 25, 2014
390aea5
feat(Scope): Brand new scope implementation which takes advantage of …
mhevery Feb 4, 2014
11f1bd8
fix(change detection): Fix for comparing string by value
vicb Feb 10, 2014
266a8eb
refactor: minor code cleanup / fixes
vicb Jan 30, 2014
195f043
chore(scope): remove watchSet API
mhevery Feb 11, 2014
e4dfb46
feat(scope): Allow expressions on non-scope context
mhevery Feb 11, 2014
c3f9395
chore(demo): update to work with new scope
mhevery Feb 11, 2014
d9dfe0f
fix(scope): allow sending emit/broadcast when no on()
mhevery Feb 12, 2014
2df2660
feat(zone): Allow escaping of auto-digest mechanism.
mhevery Feb 12, 2014
0f35c51
chore(style): code cleanup
vicb Feb 12, 2014
6de4f81
fix(balls): ball number can not go below 0
vicb Feb 12, 2014
1d042b6
refactor(collection items): Collection items indexes are int
vicb Feb 12, 2014
8d0f8d9
test(change detector): re-add a previously failing test
vicb Feb 12, 2014
8f865e5
docs(Scope): adding documentation
mhevery Feb 13, 2014
1136cd8
chore(scope): clean up style / remove $
mhevery Feb 13, 2014
443df96
refactor(NgAttachAware): wait until all bindings fire.
mhevery Feb 14, 2014
84762b1
feat(scope): Experimental: Watch once, watch not null expressions
mhevery Feb 14, 2014
c9bf23a
fix(scope): improve error msg on unstable model
mhevery Feb 14, 2014
1cb8eb9
fix(binding): call attach when attribute is not specified
mhevery Feb 14, 2014
6176ba3
chore(style): formating
mhevery Feb 14, 2014
6722e1a
fix(scope): createChild now requires context
mhevery Feb 14, 2014
9316978
chore(mustach): revert incorect watch/observ optimization
mhevery Feb 14, 2014
a558a26
fix(watch_group): prevent removed watches from firing
mhevery Feb 14, 2014
ae22a6f
fix(scope): skip scopes whithot event on broadcast
mhevery Feb 14, 2014
49377db
chore(scope): rename observe to watch(readOnly:true)
mhevery Feb 14, 2014
1f60295
revert(TextChangeListener): remove TextChangeListener support
mhevery Feb 14, 2014
c38989a
fix(ng-event): don't double digest
mhevery Feb 19, 2014
5451d63
fix(compiler): don't wait indefinitly for non-null value on =>!
pavelgj Feb 19, 2014
42c8d8c
fix(parser_generator): use parser getter/setter generator instead
pavelgj Feb 19, 2014
0814631
hack(scope): ignore nulls in > operator
pavelgj Feb 19, 2014
70d83c5
fix(introspection): warnings
mhevery Feb 19, 2014
c09745b
fitest(ngModel): Do not use input selection*
chalin Feb 20, 2014
ffe43c6
feat(scripts): robust authors.sh
chirayuk Feb 19, 2014
07f9b24
fix(change-detector): handle double.NAN for collections (in JS)
vicb Feb 18, 2014
156d638
fix(change detector): fix the handling of NaN & string values for maps
vicb Feb 18, 2014
8f1f4ec
style: code cleanup
vicb Feb 13, 2014
5bd65fb
refactor: improve code readability
vicb Feb 13, 2014
e719e75
fix(http_spec): implement lastModified getter
vicb Feb 17, 2014
1188ab0
chore(scope): add assert that scope is attached
mhevery Feb 20, 2014
2f54164
feat(animation): Animation lib and demo.
codelogic Feb 11, 2014
5571791
doc(animate): Variable naming in animation_runner.
codelogic Feb 12, 2014
2936f96
feat(animation): ng-repeat basic implementation of add & remove.
codelogic Feb 12, 2014
5ecfd5d
feat(animate): Animation in Block instead of specific directives
codelogic Feb 13, 2014
3dc9376
feat(animate): remove animation from ng-repeat.
codelogic Feb 13, 2014
4d51da7
feat(animate): Run animation frame outside of angular digest loop.
codelogic Feb 13, 2014
85ba84c
feat(animate): Prevent animations for child elements.
codelogic Feb 13, 2014
cb624c2
feat(animate): Switch to an interface model where lists of nodes are …
codelogic Feb 13, 2014
85212da
chore(whitespace): Fix whitespace in no_animate
codelogic Feb 13, 2014
01fbda1
chore(animate): Cleanup.
codelogic Feb 13, 2014
52820b1
fix(animation handle): Prevent schedule microtask from failing tests.
codelogic Feb 14, 2014
3026740
fix(tests): All existing tests now pass.
codelogic Feb 14, 2014
227846c
feat(animate): Angular NgAnimateModule.noAnimate() is the default ins…
codelogic Feb 14, 2014
964a575
feat(animate): Add tests and test stubs.
codelogic Feb 14, 2014
bb215dd
feat(animate): More tests, async tests, and mocks.
codelogic Feb 14, 2014
80b6a18
feat(animate): Fix ng_switch tests.
codelogic Feb 14, 2014
25ac69c
chore(animate): Comments and documentation.
codelogic Feb 18, 2014
e5b953d
test(animate): Animation tests for CSS Animate service.
codelogic Feb 18, 2014
63b5ac1
test(animate): Add tests for CssAnimation
codelogic Feb 18, 2014
f0ec669
test(animate): AnimationRunner tests and tweaks.
codelogic Feb 18, 2014
3475b77
doc(animate): More documentation for NgAnimate.
codelogic Feb 18, 2014
dcd103c
fix(animate): Add missing dom tools
codelogic Feb 19, 2014
72350b6
fix(ng-show): Cleanup rebase artifacts.
codelogic Feb 20, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,91 @@
<a name="v0.9.8"></a>
# v0.9.8 cozy-porcupine (2014-02-19)


## Bug Fixes

- **DateFilter:** fix a wrong type
([cec3edad](https://github.com/angular/angular.dart/commit/cec3edad1944a8411882b0a87ea6193c25513392),
[#579](https://github.com/angular/angular.dart/issues/579))
- **compiler:** support filters in attribute expressions
([8f020f99](https://github.com/angular/angular.dart/commit/8f020f998e8a4b7d5b595e5c44086fa2628fe8b3),
[#571](https://github.com/angular/angular.dart/issues/571), [#580](https://github.com/angular/angular.dart/issues/580))
- **di:** Upgrade dependency of package di preventing problems with dart sdk 1.1 resolves #408
([1f85a8ce](https://github.com/angular/angular.dart/commit/1f85a8cee164d85d6eed43e7604a0190d1542d84),
[#408](https://github.com/angular/angular.dart/issues/408), [#583](https://github.com/angular/angular.dart/issues/583))
- **doc-gen:** dartbug.com/16752
([9a1ef31d](https://github.com/angular/angular.dart/commit/9a1ef31d66f151f22b79893e11251a6780605257))
- **generator:** remove invalid sort on elements
([e2a00abe](https://github.com/angular/angular.dart/commit/e2a00abe371bb2d9d3c1d3c19849e075a32e92e4),
[#554](https://github.com/angular/angular.dart/issues/554))
- **ng-attr:** remove camel-cased dom attributes
([b5e45117](https://github.com/angular/angular.dart/commit/b5e45117c17fdd07d5db659815eb49c2dca17b84),
[#567](https://github.com/angular/angular.dart/issues/567))
- **ng-pluralize:** use ${..} to interpolate
([a630487d](https://github.com/angular/angular.dart/commit/a630487d302e396a920e02c8db5d256a81d3dd1a),
[#572](https://github.com/angular/angular.dart/issues/572))
- **ng-value:** Add ng-value support for checked/radio/option
([8fc2c0f4](https://github.com/angular/angular.dart/commit/8fc2c0f49aabc53ee6240ad8063ecf6c9c8b8a1f))
- **ngModel:**
- ensure checkboxes and radio buttons are flagged as dirty when changed
([5766a6a1](https://github.com/angular/angular.dart/commit/5766a6a173dc1d65b9293fd5bd0bcbc21b0791ec),
[#569](https://github.com/angular/angular.dart/issues/569), [#585](https://github.com/angular/angular.dart/issues/585))
- process input type=number according to convention, using valueAsNumber
([cf0160b8](https://github.com/angular/angular.dart/commit/cf0160b8c316a39ac9d0fcce843c6f764429a1d4),
[#574](https://github.com/angular/angular.dart/issues/574), [#577](https://github.com/angular/angular.dart/issues/577))
- ensure validation occurs when the model value changes upon digest
([f34e0b31](https://github.com/angular/angular.dart/commit/f34e0b31a6f2f42457a6d1a1b5b5aaa7e2ef86fe))
- **ngShow:** Add/remove ng-hide class instead of ng-show class
([0b88d2e8](https://github.com/angular/angular.dart/commit/0b88d2e8102db8b89f38b00c277b9023b260285e),
[#521](https://github.com/angular/angular.dart/issues/521))
- **package.json:** add repo, licenses and switch to devDependencies
([d099db59](https://github.com/angular/angular.dart/commit/d099db5944e2287fbf97a13b1aa73f8082652e09),
[#544](https://github.com/angular/angular.dart/issues/544), [#545](https://github.com/angular/angular.dart/issues/545))
- **scope:** Use Iterable instead of List
([951fa178](https://github.com/angular/angular.dart/commit/951fa1783afa65f410a2b82249850eed458ed294),
[#565](https://github.com/angular/angular.dart/issues/565))


## Features

- **forms:**
- generate ng-submit-valid / ng-submit-invalid CSS classes upon form submission
([4bf9447c](https://github.com/angular/angular.dart/commit/4bf9447cc64650d6c73b66c844fb5396b4a2ae27))
- provide support for reseting forms, fieldsets and models
([c75202d5](https://github.com/angular/angular.dart/commit/c75202d5d7ecabd01366f2198e0c0c3b5c087e59))
- **ngModel:** Treat the values of number and range inputs as numbers
([e703bd1b](https://github.com/angular/angular.dart/commit/e703bd1bc75f4d6420afad0bbb975b3e23672ff8),
[#527](https://github.com/angular/angular.dart/issues/527))


## Breaking Changes
- **ng-attr**
- Due to ([b5e45117](https://github.com/angular/angular.dart/commit/b5e45117c17fdd07d5db659815eb49c2dca17b84),
mappings in annotations must use snake-case-names instead of
camelCaseNames.  To migrate your code, follow the example below:

Before:

@NgComponent(
// …
map: const {
'domAttributeName': '=>fieldSetter'
}
)
class MyComponent { …

After:

@NgComponent(
// …
map: const {
'dom-attribute-name': '=>fieldSetter'
}
)
class MyComponent { …



<a name="v0.9.7"></a>
# v0.9.7 pachyderm-moisturization (2014-02-10)

Expand Down
7 changes: 2 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ Before you submit your pull request consider the following guidelines:
git commit -a
```

* Build your changes locally to ensure all the tests pass

```shell
./run-test.sh
```
* Build your changes locally to ensure all the tests pass: see the [developer documentation][dev-doc].

* Push your branch to Github:

Expand Down Expand Up @@ -226,3 +222,4 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
[communityMilestone]: https://github.com/angular/angular.dart/issues?milestone=13&state=open
[coc]: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
[dev-doc]: https://github.com/angular/angular.dart/blob/master/DEVELOPER.md
167 changes: 167 additions & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# Building and Testing AngularDart

This document describes how to set up your development environment to build and test AngularDart, and
explains the basic mechanics of using `git`, `node`, and `npm`.

See the [contributing guidelines](https://github.com/angular/angular.dart/blob/master/CONTRIBUTING.md) for how to contribute your own code to

1. [Prerequisite Software](#prerequisite-software)
2. [Getting the Sources](#getting-the-sources)
3. [Environment Variable Setup](#environment-variable-setup)
4. [Installing NPM Modules and Dart Packages](#installing-npm-modules-and-dart-packages)
5. [Running Tests Locally](#running-tests-locally)
6. [Continuous Integration using Travis](#continuous-integration-using-travis)

## Prerequisite Software

Before you can build and test AngularDart, you must install and configure the
following products on your development machine:

* [Dart](https://www.dartlang.org/): as can be expected, AngularDart requires
an installation of the Dart-SDK and Dartium (a version of
[Chromium](http://www.chromium.org) with native support for Dart through the
Dart VM). One of the **simplest** ways to get both is to install the **Dart
Editor bundle**, which includes the editor, sdk and Dartium. See the [Dart
tools download page for
instructions](https://www.dartlang.org/tools/download.html).

* [Git](http://git-scm.com/) and/or the **Github app** (for
[Mac](http://mac.github.com/) or [Windows](http://windows.github.com/)): the
[Github Guide to Installing
Git](https://help.github.com/articles/set-up-git) is a good source of
information.

* [Node.js](http://nodejs.org): We use Node to run a development web server,
run tests, and generate distributable files. We also use Node's Package
Manager (`npm`). Depending on your system, you can install Node either from
source or as a pre-packaged bundle.

## Getting the Sources

Forking and Cloning the AngularDart repository:

1. Login to your Github account or create one by following the instructions given [here](https://github.com/signup/free).
Afterwards.
2. [Fork](http://help.github.com/forking) the [main AngularDart repository](https://github.com/angular/angular.dart).
3. Clone your fork of the AngularDart repository and define an `upstream` remote pointing back to the AngularDart repository that you forked in the first place:

```shell
# Clone your Github repository:
git clone git@github.com:<github username>/angular.dart.git

# Go to the AngularDart directory:
cd angular.dart

# Add the main AngularDart repository as an upstream remote to your repository:
git remote add upstream https://github.com/angular/angular.dart.git
```

## Environment Variable Setup


Define the environment variables listed below. These are mainly needed for the
test scripts. The notation shown here is for
[`bash`](http://www.gnu.org/software/bash/); adapt as appropriate for your
favorite shell. (Examples given below of possible values for initializing the
environment variables assume Mac OS X and that you have installed the Dart
Editor in the directory named by `$DART_EDITOR_DIR`. This is only for
illustrative purposes.)

```shell
# CHROME_BIN: path to a Chrome browser executable; e.g.,
export CHROME_BIN="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

# CHROME_CANARY_BIN: path to a Dartium browser executable; e.g.,
export CHROME_CANARY_BIN="$DART_EDITOR_DIR/chromium/Chromium.app/Contents/MacOS/Chromium"
```
**Note**: the `$CHROME_CANARY_BIN` environment variable is used by karma to run your tests
in dartium instead of chromium. If you don't do this, the dart2js compile will make the tests
run extremely slow since it has to wait for a full js compile each time.

You should also add the Dart SDK `bin` directory to your path and/or define `DART_SDK`; e.g.

```shell
# DART_SDK: path to a Dart SDK directory; e.g.,
export DART_SDK="$DART_EDITOR_DIR/dart-sdk"

# Update PATH to include the Dart SDK bin directory
PATH+=":$DART_SDK/bin"
```
## Installing NPM Modules and Dart Packages

Next, install the modules and packages needed to run AngularDart tests:

```shell
# Install node.js dependencies:
npm install

# Install karma onto your command line (optional)
npm install karma -g

# Install Dart packages
pub install
```

## Running Tests Locally

NOTE: scripts are being written to embody the following steps.

To run base tests:

```shell
# Source a script to define yet more environment variables
. ./scripts/env.sh

# Run io tests:
dart --checked test/io/all.dart

# Run expression extractor tests:
scripts/test-expression-extractor.sh

Run the Dart Analyzer:
./scripts/analyze.sh
```

To run Karma tests over Dartium, execute the following shell commands (which
will launch the Karma server):

```shell
. ./scripts/env.sh
node "node_modules/karma/bin/karma" start karma.conf \
--reporters=junit,dots --port=8765 --runner-port=8766 \
--browsers=Dartium
```

In another shell window or tab, or from your favorite IDE, launch the Karma
tests proper by executing:

```shell
. ./scripts/env.sh
karma_run.sh
```

**Note:**: If the dart analyzer fails with warnings, the tests will not run.
You can manually run the tests if this happens:

```shell
karma run --port=8765
```

## Debugging

In the dart editor you can configure a dartium launch target for the karma test runner debug page.
The menu option is under Run > Manage Launches > Create new Dartium Launch.

```
http://localhost:8765/debug.html
```

If you want to only run a single test you can alter the test you wish to run by changing `it` to `iit`
or `describe` to `ddescribe`. This will only run that individual test and make it much easier to debug.


## Continuous Integration using Travis

See the instructions given [here](https://github.com/angular/angular.dart/blob/master/travis.md).

-----
85 changes: 85 additions & 0 deletions demo/animate_demo/animate_demo.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import 'dart:html' as dom;

import 'package:angular/angular.dart';
import 'package:angular/animate/module.dart';

// This annotation allows Dart to shake away any classes
// not used from Dart code nor listed in another @MirrorsUsed.
//
// If you create classes that are referenced from the Angular
// expressions, you must include a library target in @MirrorsUsed.
@MirrorsUsed(override: '*')
import 'dart:mirrors';

@NgController(
selector: '[animation-demo]',
publishAs: 'adc'
)
class AnimationDemoController {
final dom.Element rootElement;
final NgAnimate animate;
bool areThingsVisible = false;
bool boxToggle = false;
bool ifToggle = false;
int thingNumber = 1;
String currentThing;

dom.Element _boxElement;
dom.Element _hostElement;
List<dom.Element> _animatedBoxes = [];
List<String> listOfThings = [];

AnimationDemoController(this.animate, this.rootElement) {
_boxElement = rootElement.querySelector(".animated-box");
_hostElement = rootElement.querySelector(".animated-host");
}

animateABox() {
if(_boxElement != null) {
if(boxToggle) {
animate.removeClass([_boxElement], "magic");
} else {
animate.addClass([_boxElement], "magic");
}
boxToggle = !boxToggle;
}
}

toggleABunchOfThings() {
if(_hostElement != null) {
if(!areThingsVisible && _animatedBoxes.length == 0) {

for(int i = 0; i < 1000; i++) {
var element = new dom.Element.div();
element.classes.add("magic-box");
_animatedBoxes.add(element);
}
animate.insert(_animatedBoxes, _hostElement);
} else if (!areThingsVisible) {
// I'm not sure what to do about this
animate.insert(_animatedBoxes, _hostElement);
} else if (_animatedBoxes.length > 0) {
animate.remove(_animatedBoxes);
}

areThingsVisible = !areThingsVisible;
}
}

addThing() {
listOfThings.add("Thing-$thingNumber");
thingNumber++;
}

removeThing() {
if(listOfThings.length > 0) {
listOfThings.removeLast();
}
}
}

main() {
ngBootstrap(module: new Module()
..install(new NgAnimateModule())
..type(AnimationDemoController));
}
Loading