I need the child component template to be loaded into the parent component template. (calling them child and parent for simplicity)
Here is the child component:
import {Component,Directive, ElementRef, Input} from '@angular/core';
import {IONIC_DIRECTIVES} from 'ionic-angular';
@Component({
selector: '[parentselector]',
template: '<div>I AM A CHILD</div>',
directives: [IONIC_DIRECTIVES]
})
export class ChildPage {
constructor() {
}
}
This is my parent component:
@Component({
templateUrl: 'build/pages/parent/parent.html',
directives: [ChildPage]
})
And here is the HTML of the Parent Component:
<ion-content>
<ion-slides>
<ion-slide><parentselector>Parent To Be Overridden</parentselector>
</ion-slide>
</ion-slides>
</ion-content>
Can you spot any issues in this setup?