Is it Mandatory to have selectore when we use templateUrl in Ionic 2


#1

I am having this code

@Component({
    selector: 'page-home',
    templateUrl: 'home.html'
})

When i commented selector property this will give

No template specified for component HomePage

my doubt is, is it mandatory to use selector when we use templateUrl ?


#2

Take a look at your page’s .scss file:

.ios, .md, .wp {

  page-home {

    ion-header {
      background-color: $white !important;
    }

    ...

  }

}