Finishing Up
Wrap up the development for the ionic-animations application with a few final amendments.
We'll cover the following
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 namedinterfaces
, which is situated within theionic-animations/src/app
directory.
We add the following code within the ionic-animations/src/app/interfaces/location.ts
file:
Get hands-on with 1400+ tech skills courses.