admin管理员组文章数量:1393058
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.
本文标签: angularionic 8 custom component does not renderStack Overflow
版权声明:本文标题:angular - ionic 8 custom component does not render - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744773481a2624484.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论