Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
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
9c4ef04
feat(animate): Parse multiple css transitions, delays and select the …
codelogic Feb 21, 2014
92769cd
feat(animate): Parse multiple css transitions and animations.
codelogic Feb 21, 2014
907a9f0
feat(animate): Remove DateTime from Animation.
codelogic Feb 21, 2014
9dd246e
Merge remote-tracking branch 'angular/master' into animate
codelogic Feb 24, 2014
0e7d7c6
feat(aniamte): Rebuild NgAnimate.
codelogic Feb 26, 2014
f2323d1
Merging angular/master
codelogic Feb 26, 2014
87ed80d
feat(animate): remove show hide.
codelogic Feb 26, 2014
31ce2e6
feat(animate): Add expando support for AnimationOptimizer
codelogic Feb 26, 2014
f59e146
feat(animate): Run animation frames outside of angular.
codelogic Feb 26, 2014
79f666c
Merging angular/master
codelogic Feb 26, 2014
7dca147
fix(ng-control): Merge fixes
codelogic Feb 26, 2014
479fb0e
Merge remote-tracking branch 'angular/master' into animate
codelogic Feb 26, 2014
9694083
feat(animate): Allow the optimizer to traverse outside shadow dom to …
codelogic Feb 26, 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
81 changes: 81 additions & 0 deletions demo/animate_demo/pubspec.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Generated by pub
# See http://pub.dartlang.org/doc/glossary.html#lockfile
packages:
analyzer:
description: analyzer
source: hosted
version: "0.10.5"
angular:
description:
path: "../.."
relative: true
source: path
version: "0.9.7"
args:
description: args
source: hosted
version: "0.9.0"
browser:
description: browser
source: hosted
version: "0.9.1"
collection:
description: collection
source: hosted
version: "0.9.1"
di:
description: di
source: hosted
version: "0.0.32"
html5lib:
description: html5lib
source: hosted
version: "0.9.1"
intl:
description: intl
source: hosted
version: "0.9.1"
logging:
description: logging
source: hosted
version: "0.9.1+1"
path:
description: path
source: hosted
version: "1.0.0"
perf_api:
description: perf_api
source: hosted
version: "0.0.8"
quiver:
description: quiver
source: hosted
version: "0.17.0"
route_hierarchical:
description: route_hierarchical
source: hosted
version: "0.4.14"
shadow_dom:
description: shadow_dom
source: hosted
version: "0.9.2"
source_maps:
description: source_maps
source: hosted
version: "0.9.0"
stack_trace:
description: stack_trace
source: hosted
version: "0.9.1"
unittest:
description: unittest
source: hosted
version: "0.10.0"
unmodifiable_collection:
description: unmodifiable_collection
source: hosted
version: "0.9.2+1"
utf:
description: utf
source: hosted
version: "0.9.0"
7 changes: 7 additions & 0 deletions demo/animate_demo/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: angular_animate_demo
version: 0.0.1
dependencies:
angular:
path: ../..
browser: any
unittest: any
36 changes: 36 additions & 0 deletions demo/animate_demo/web/animate_demo.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
library animate_demo;

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';

part 'repeat_demo.dart';
part 'visibility_demo.dart';
part 'stress_demo.dart';
part 'css_demo.dart';

@NgController(
selector: '[animation-demo]',
publishAs: 'demo'
)
class AnimationDemoController {
var pages = ["About", "ng-repeat", "Visibility", "Css", "Stress Test"];
var currentPage = "About";
}

main() {
ngBootstrap(module: new Module()
..install(new NgAnimateModule())
..type(RepeatDemoComponent)
..type(VisibilityDemoComponent)
..type(StressDemoComponent)
..type(CssDemoComponent)
..type(AnimationDemoController));
}
32 changes: 32 additions & 0 deletions demo/animate_demo/web/css_demo.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
part of animate_demo;

@NgComponent(
selector: 'css-demo',
template: '''
<div class="css-demo">
<button ng-click="ctrl.stateA = !ctrl.stateA"
ng-class="{'active': ctrl.stateA}">
Toggle A</button>
<button ng-click="ctrl.stateB = !ctrl.stateB"
ng-class="{'active': ctrl.stateB}">
Toggle B</button>
<button ng-click="ctrl.stateC = !ctrl.stateC"
ng-class="{'active': ctrl.stateC}">
Toggle C</button>
<div class="box-container">
<div class="css-box" ng-class="{
'a': ctrl.stateA,
'b': ctrl.stateB,
'c': ctrl.stateC}">BOX</div>
</div>
</div>
</div>
''',
publishAs: 'ctrl',
applyAuthorStyles: true
)
class CssDemoComponent {
bool stateA = false;
bool stateB = false;
bool stateC = false;
}
49 changes: 49 additions & 0 deletions demo/animate_demo/web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html>
<head>
<title>NgAnimate | Demos, Stress Tests, Examples and More!</title>
<link type="text/css" rel="stylesheet" href="style.css" />
</head>
<body class="ng-cloak" ng-app animation-demo>
<nav>
<button ng-repeat="page in demo.pages"
ng-click="demo.currentPage = page"
ng-class="{'current': demo.currentPage == page}">
{{page}}
</button>
</nav>
<div class="content" ng-switch="demo.currentPage">
<div class="demo" ng-switch-default>
<h2>About</h2>
<p>The NgAnimate module is a port with modifications of the original
AngularJS animation module. The default implementation does nothing.
It simply provides hooks into the angular subsystem. Adding
<code>NgAnimateModule</code> however is a whole different story. Once
added it allows you define and run css animations on your elements with
pure CSS.</p>
<p>Check out the demos above.</p>
</div>
<div class="demo" ng-switch-when="ng-repeat">
<h2>ng-repeat Demo</h2>
<repeat-demo></repeat-demo>
</div>
<div class="demo" ng-switch-when="Visibility">
<h2>Visibility Demo</h2>
<visibility-demo></visibility-demo>
</div>
<div class="demo" ng-switch-when="Css">
<h2>Css Demo</h2>
<p><strong>TODO</strong> This should contain a demo of css animation by applying multiple
classes and running multiple simultanious animations on the same
object.</p>
<css-demo></css-demo>
</div>
<div class="demo" ng-switch-when="Stress Test">
<h2>Stress Test</h2>
<stress-demo></stress-demo>
</div>
</div>
<script type="application/dart" src="animate_demo.dart"></script>
<script src="packages/browser/dart.js"></script>
</body>
</html>
32 changes: 32 additions & 0 deletions demo/animate_demo/web/repeat_demo.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
part of animate_demo;

@NgComponent(
selector: 'repeat-demo',
template: '''
<div class="repeat-demo">
<button ng-click="ctrl.addItem()">Add Thing</button>
<button ng-click="ctrl.removeItem()">Remove Thing
</button>
<ul><li ng-repeat="outer in ctrl.items">
<ul><li ng-repeat="inner in ctrl.items">
{{inner}}</li></ul>
</li></ul>
</div>
''',
publishAs: 'ctrl',
applyAuthorStyles: true
)
class RepeatDemoComponent {
var thing = 0;
var items = [];

addItem() {
items.add("Thing ${thing++}");
}

removeItem() {
if(items.length > 0) {
items.removeLast();
}
}
}
34 changes: 34 additions & 0 deletions demo/animate_demo/web/stress_demo.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
part of animate_demo;

@NgComponent(selector: 'stress-demo', template:
'''
<div class="stress-demo">
<button ng-click="ctrl.visible = !ctrl.visible">
Toggle Visibility</button>
<div>
<div class="stress-box"
ng-repeat="number in ctrl.numbers">
</div>
</div>
</div>
''',
publishAs: 'ctrl', applyAuthorStyles: true)
class StressDemoComponent {
bool _visible = true;

// When visibility changes add or remove a large
// chunk of elements.
set visible(bool value) {
if (value) {
for (int i = 0; i < 200; i++) {
numbers.add(i);
}
} else {
numbers.clear();
}
_visible = value;
}
get visible => _visible;

List<int> numbers = [1, 2];
}
Loading