blueclosure / BCDetect

5 stars 0 forks source link

BCDetect breaking on angular 4.x application with webpack #34

Closed 0xdevalias closed 6 years ago

0xdevalias commented 6 years ago

Running the site in a normal browser works fine, when running through BCDetect, get the following error thrown (private site, can't share source)

vendor.bundle.js_ori.js:157900 Uncaught Error: Template parse errors:
Can't bind to 'routerLink' since it isn't a known property of 'a'. ("
        <a [attr.id]="breadcrumbId" *ngIf="data.isLink" [ERROR ->][routerLink]="data.path">{{data.title}}</a>
        <span [attr.id]="breadcrumbId" *ngIf="!data.isLin"): ng:///FooCommonModule/BreadCrumbComponent.html@1:56
Can't bind to 'ngIf' since it isn't a known property of 'a'. ("
        <a [attr.id]="breadcrumbId" [ERROR ->]*ngIf="data.isLink" [routerLink]="data.path">{{data.title}}</a>
        <span [attr.id]="breadcrumbId"): ng:///FooCommonModule/BreadCrumbComponent.html@1:36
Property binding ngIf not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations". ("
        [ERROR ->]<a [attr.id]="breadcrumbId" *ngIf="data.isLink" [routerLink]="data.path">{{data.title}}</a>
        <"): ng:///FooCommonModule/BreadCrumbComponent.html@1:8
Can't bind to 'ngIf' since it isn't a known property of 'span'. ("If="data.isLink" [routerLink]="data.path">{{data.title}}</a>
        <span [attr.id]="breadcrumbId" [ERROR ->]*ngIf="!data.isLink">{{data.title}}</span>
        <span [attr.id]="breadcrumbSeperatorId" *ngIf="dat"): ng:///FooCommonModule/BreadCrumbComponent.html@2:39
Property binding ngIf not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations". ("<a [attr.id]="breadcrumbId" *ngIf="data.isLink" [routerLink]="data.path">{{data.title}}</a>
        [ERROR ->]<span [attr.id]="breadcrumbId" *ngIf="!data.isLink">{{data.title}}</span>
        <span [attr.id]="br"): ng:///FooCommonModule/BreadCrumbComponent.html@2:8
Can't bind to 'ngIf' since it isn't a known property of 'span'. ("crumbId" *ngIf="!data.isLink">{{data.title}}</span>
        <span [attr.id]="breadcrumbSeperatorId" [ERROR ->]*ngIf="data.child" class="seperator"> / </span>
        <ng2common-breadcrumb *ngIf="data.child" [dat"): ng:///FooCommonModule/BreadCrumbComponent.html@3:48
Property binding ngIf not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations". ("tle}}</a>
        <span [attr.id]="breadcrumbId" *ngIf="!data.isLink">{{data.title}}</span>
        [ERROR ->]<span [attr.id]="breadcrumbSeperatorId" *ngIf="data.child" class="seperator"> / </span>
        <ng2c"): ng:///FooCommonModule/BreadCrumbComponent.html@3:8
Can't bind to 'data' since it isn't a known property of 'ng2common-breadcrumb'.
1. If 'ng2common-breadcrumb' is an Angular component and it has 'data' input, then verify that it is part of this module.
2. If 'ng2common-breadcrumb' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("d" *ngIf="data.child" class="seperator"> / </span>
        <ng2common-breadcrumb *ngIf="data.child" [ERROR ->][data]="data.child"></ng2common-breadcrumb>
    "): ng:///FooCommonModule/BreadCrumbComponent.html@4:49
Can't bind to 'ngIf' since it isn't a known property of 'ng2common-breadcrumb'.
1. If 'ng2common-breadcrumb' is an Angular component and it has 'ngIf' input, then verify that it is part of this module.
2. If 'ng2common-breadcrumb' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("readcrumbSeperatorId" *ngIf="data.child" class="seperator"> / </span>
        <ng2common-breadcrumb [ERROR ->]*ngIf="data.child" [data]="data.child"></ng2common-breadcrumb>
    "): ng:///FooCommonModule/BreadCrumbComponent.html@4:30
Property binding ngIf not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations". ("    <span [attr.id]="breadcrumbSeperatorId" *ngIf="data.child" class="seperator"> / </span>
        [ERROR ->]<ng2common-breadcrumb *ngIf="data.child" [data]="data.child"></ng2common-breadcrumb>
    "): ng:///FooCommonModule/BreadCrumbComponent.html@4:8
    at syntaxError (vendor.bundle.js_ori.js:157900)
    at TemplateParser.parse (vendor.bundle.js_ori.js:168997)
    at JitCompiler._compileTemplate (vendor.bundle.js_ori.js:183200)
    at vendor.bundle.js_ori.js:183119
    at Set.forEach (<anonymous>)
    at JitCompiler._compileComponents (vendor.bundle.js_ori.js:183119)
    at vendor.bundle.js_ori.js:183006
    at Object.then (vendor.bundle.js_ori.js:157889)
    at JitCompiler._compileModuleAndComponents (vendor.bundle.js_ori.js:183005)
    at JitCompiler.compileModuleAsync (vendor.bundle.js_ori.js:182934)
0xdevalias commented 6 years ago

Just tried this on v1.1.1 and still seem to be getting issues:

Error {__zone_symbol__error: Error: Template parse errors:
Can't bind to 'routerLink' since it isn't a known property of 'a'. ("
…, …}
etc
wisec commented 6 years ago

@0xdevalias to reproduce the issue it would help a lot:

0xdevalias commented 6 years ago
document.querySelector('[ng-version]').getAttribute('ng-version');
"4.4.4"
wisec commented 6 years ago

@0xdevalias we just released version 1.1.2 which should fix the exact error you had. Please let us know if it works for you. Thanks

0xdevalias commented 6 years ago

Great! Will check it out when I'm back at work and let you know. Thanks :)

Edit: Not currently seeing it in the downloads in our account. Guessing it will be there shortly?

wisec commented 6 years ago

It's ready for download since then, try downloading it from the download section. Edit: We just saw dashboard news weren't updated, maybe they misguided you - that's fixed now.

wisec commented 6 years ago

Closing as it should be fixed now. Feel free to reopen.