The @IonicPage decoder is deprecated?

I tried to remove @IonicPage from my code and everything works fine. But I didn't find about it in the documentation. Segment property @IonicPage not working. If I go to pages then the url doesn't change, the url is always http: // localhost (instead of http: // localhost / page1 ). Sample page:

@IonicPage({
    segment: 'page1'
})
@Component({
  selector: 'page1',
  template: 'some content'
})
export class Page1 {

}

      

+3


source to share


1 answer


Unless you change the rootPage in app.component.ts from imported component to string, it is not lazy loaded.

As @sebaferreras @IonicPage mentioned, you play if you are lazy.



When you use lazy load pages in Ionic, you add modules to the page with your own @ngModule .
You are using IonicPageModule.forChild (PageName) in the import: [] section ,
instead of IonicModule.forRoot (AppName) in the top level app-module.ts

0


source







All Articles