Using an External Controller Class

In the same fashion we should extract our controller class into a separate file, as we want to avoid clutter when our application grows.

Create a file called main-component.ts in the app/src/components/main/ folder and move our controller class definition there.