Reputation: 685
OK, I'm on angular-dart 0.11.0, following the examples provided, applying the appropriate name changes and no joy. Here goes:
main.dart
import 'package:angular/angular.dart';
import 'package:angular/application_factory.dart';
import 'package:angular/animate/module.dart';
part 'package:myapp/src/my_ctrl.dart';
part 'package:myapp/src/my_dir.dart';
class MyModule extends Module {
MyModule() {
install(new AnimationModule());
bind(MyCtrl);
bind(MyDir);
}
}
main() {
applicationFactory()
.addModule(new MyModule())
.run();
}
main.css
.my-base-class.ng-enter {
transition: all 2s;
opacity: 0.000001; /* to avoid some chrome bug? */
}
.my-base-class.ng-enter.ng-enter-active {
opacity: 1.0;
}
index.html
<div ng-if="ctrl.bool" class="my-base-class">my stubbornly refusing to animate content</div>
the animation related classes ('ng-enter', etc) don't seem to get applied. Instead, i see an 'ng-binding' class. I suspect that the current code doesn't even activate the animation feature but i don't know how to fix it as there are no error messages.
thanks in advance
Upvotes: 1
Views: 156
Reputation: 685
Sorted it out, there was nothing wrong with the animation setup. The problem was on how I was initiating the animation. I was expecting some data from an ajax call and, of course, angular-dart cannot handle this on its own, it needs to be told about the change through 'scope.watch'
Upvotes: 2