Directive working for ionic serve, but not for build


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 :


@Directive({selector: '[dataFile]'})

export class dataFileDirective {
    constructor(private el: ElementRef) {

    @Input('dataFile') WordFile: any;

import and declarations

<div dataFile="{{}}"></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

@max @mhartington