here is my ionic info:
global packages:
@ionic/cli-utils : 1.0.0
Cordova CLI : 7.0.1
Ionic CLI : 3.0.0
local packages:
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-cordova : 1.0.0
@ionic/cli-plugin-ionic-angular : 1.0.0
Ionic Framework : ionic-angular 3.2.1
System:
Node : v7.9.0
OS : macOS Sierra
Xcode : Xcode 8.3 Build version 8W120l
ios-deploy : 1.9.1
ios-sim : 5.0.13
here is the relevant part of my package.json file:
"dependencies": {
"@angular/animations": "^4.1.2",
"@angular/common": "^4.1.2",
"@angular/compiler": "^4.1.2",
"@angular/compiler-cli": "^4.1.2",
"@angular/core": "^4.1.2",
"@angular/forms": "^4.1.2",
"@angular/http": "^4.1.2",
"@angular/platform-browser": "^4.1.2",
"@angular/platform-browser-dynamic": "^4.1.2",
"@ionic-native/core": "^3.8.0",
in my app.module.ts file:
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
and in imports:
imports: [
BrowserModule,
BrowserAnimationsModule,
My pages are all using the new @page decorator. Could this be the problem?
In one of my pages i have a component imported via my page’s page.module like this:
import { ProgressbarComponentModule } from '../../components/progressbar/progressbar.module';
...
imports: [
ProgressbarComponentModule,
...
export class MyPageModule {}
In my Progressbar component, i attempt to use animation as noted below.
in the progress bar’s template, i add the appropriate trigger:
<div class="progress-inner" [@animateProgress]>
the relevant part of the progress bar component.ts file looks like this:
import { trigger, state, style, transition, animate, AUTO_STYLE } from '@angular/animations';
...
@Component({
selector: 'progressbar',
templateUrl: 'progressbar.html',
animations: [
trigger('animateProgress', [
state('in', style({
width: '0px'
})),
transition('void => *', [
style({
width: '300px'
}),
animate(10000)
])
])
]
This should animate the width of my div with the class ‘.progress-inner’ from a width of 300px to 0px over 10 seconds when the component is added to the DOM, but it does nothing. Even the initial size of 300px is not set.
There are NO errors output during my build or when running the application either.
Any ideas?