@IonicPage & @Component - how to use both?

Hello! I am setting up a project with lazy loading and dynamic links. I am finding documentation on IonicPage somewhat confusing. I’ve tried few options I had in mind for metadata, but still no luck. Here is a code that is not working because segment and defaultHistory is supposed to be inside of IonicPage and templateUrl is supposed to be inside Component. Any thoughts?

  segment: 'detail/:id',
  defaultHistory: ['list']
  templateUrl: 'detail.html'

Ah! Sorry guys, it works! The problem was causing smth else.