Finishing Up

Wrap up the development for the ionic-animations application with a few final amendments.

The Location interface

One last task remains before we can run the application and test that in the browser.

We need to create our Location interface, which we used within the HomePage class to define the expected structure for the following:

public items: Array<Location> = [
  // ...
];
public togglePanel(item: Location = null): void {
 // ...
}
private isContentDisplayed(item: Location): void {
  // ...
}

We generate the interface using the following Ionic CLI command:

ionic g interface interfaces/location

Note: Here, we create the Location interface file within a new subdirectory named interfaces, which is situated within the ionic-animations/src/app directory.

We add the following code within the ionic-animations/src/app/interfaces/location.ts file:

Get hands-on with 1200+ tech skills courses.