diff --git a/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/app.module.browser.ts b/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/app.module.browser.ts index 03104b4..08653c7 100644 --- a/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/app.module.browser.ts +++ b/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/app.module.browser.ts @@ -2,12 +2,14 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppModuleShared } from './app.module.shared'; import { AppComponent } from './components/app/app.component'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; @NgModule({ bootstrap: [ AppComponent ], imports: [ BrowserModule, - AppModuleShared + AppModuleShared, + BrowserAnimationsModule ], providers: [ { provide: 'BASE_URL', useFactory: getBaseUrl } diff --git a/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/app.module.server.ts b/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/app.module.server.ts index 0608381..a0f3a5f 100644 --- a/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/app.module.server.ts +++ b/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/app.module.server.ts @@ -2,12 +2,14 @@ import { NgModule } from '@angular/core'; import { ServerModule } from '@angular/platform-server'; import { AppModuleShared } from './app.module.shared'; import { AppComponent } from './components/app/app.component'; +import { NoopAnimationsModule } from '@angular/platform-browser/animations'; @NgModule({ bootstrap: [ AppComponent ], imports: [ ServerModule, - AppModuleShared + AppModuleShared, + NoopAnimationsModule ] }) export class AppModule { diff --git a/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/components/fetchdata/fetchdata.component.html b/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/components/fetchdata/fetchdata.component.html index 8d24e71..e3d15ee 100644 --- a/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/components/fetchdata/fetchdata.component.html +++ b/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/components/fetchdata/fetchdata.component.html @@ -14,7 +14,7 @@ - + {{ forecast.dateFormatted }} {{ forecast.temperatureC }} {{ forecast.temperatureF }} diff --git a/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/components/fetchdata/fetchdata.component.ts b/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/components/fetchdata/fetchdata.component.ts index a4c06f4..2efd86a 100644 --- a/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/components/fetchdata/fetchdata.component.ts +++ b/templates/Microsoft.DotNet.Web.Spa.ProjectTemplates/angular/ClientApp/app/components/fetchdata/fetchdata.component.ts @@ -1,9 +1,18 @@ import { Component, Inject } from '@angular/core'; import { Http } from '@angular/http'; +import { trigger, style, transition, animate } from '@angular/animations'; @Component({ selector: 'fetchdata', - templateUrl: './fetchdata.component.html' + templateUrl: './fetchdata.component.html', + animations: [ + trigger('itemAnim', [ + transition(':enter', [ + style({ transform: 'translateX(-100%)' }), + animate(350) + ]) + ]) + ] }) export class FetchDataComponent { public forecasts: WeatherForecast[];