Hey there, I was trying to build an ionic browser app. I am using all latest dependencies. I followed Angular 2 tutorial to setup directive :
app.component.ts
@Directive({selector: '[dataFile]'})
export class dataFileDirective {
constructor(private el: ElementRef) {
}
@Input('dataFile') WordFile: any;
}
app.module.ts
import and declarations
home.html
<div dataFile="{{word.pro}}"></div>
When I am using ionic serve it’s working just perfect as it suppose to be. But when I try to build or run the Directive selector missing from my div <div></div>. While for ionic serve it used to be <div ng-reflect--word-file="shunshine"></div>.
Any idea what could be wrong here?
Thanks in advance