I created a custom component that has a .ts look like below:
@Component({
selector: 'app-top-recommendations',
templateUrl: './top-recommendationsponent.html',
styleUrls: ['./top-recommendationsponent.scss'],
imports: [
CommonModule,
IonicModule,
FormsModule
],
})
export class TopRecommendationsComponent implements OnInit {
...
it is embedded on tab1.html like this
<app-top-recommendations [doRefresh]="doRefreshMainInsights"></app-top-recommendations>
the tab1.ts is like below
@Component({
selector: 'app-tab1',
templateUrl: 'tab1.page.html',
styleUrls: ['tab1.page.scss'],
standalone: false,
})
export class Tab1Page implements OnInit{
...
I do not see any error when I build but the content of top-recommendations component does not show up either.
i am using ionic 8 with angular.
I created a custom component that has a .ts look like below:
@Component({
selector: 'app-top-recommendations',
templateUrl: './top-recommendationsponent.html',
styleUrls: ['./top-recommendationsponent.scss'],
imports: [
CommonModule,
IonicModule,
FormsModule
],
})
export class TopRecommendationsComponent implements OnInit {
...
it is embedded on tab1.html like this
<app-top-recommendations [doRefresh]="doRefreshMainInsights"></app-top-recommendations>
the tab1.ts is like below
@Component({
selector: 'app-tab1',
templateUrl: 'tab1.page.html',
styleUrls: ['tab1.page.scss'],
standalone: false,
})
export class Tab1Page implements OnInit{
...
I do not see any error when I build but the content of top-recommendations component does not show up either.
i am using ionic 8 with angular.
Share Improve this question asked Mar 11 at 19:59 Moblize ITMoblize IT 1,2704 gold badges21 silver badges51 bronze badges 1- You need to import TopRecommendationsComponent as well where Tab1Page was imported in specific module – Aman Gojariya Commented Mar 12 at 8:14
1 Answer
Reset to default 0I think the problem is when importing the TopRecommendationsComponent component, which is not being imported in Tab1Page, and another problem you could have is explicitly declaring standalone as false in the Tab1Page.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744773482a4592904.html
评论列表(0条)