TwanoO67 / ngx-admin-lte

Admin LTE for Angular 2/4/6/8 as a NPM package
MIT License
108 stars 47 forks source link

Template errors in 2.0.0-beta.8: #50

Closed catull closed 6 years ago

catull commented 6 years ago

The browser (latest Chrome) console emits this:

Uncaught Error: Template parse errors:
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16 ("- Create the tabs -->
    <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
        <ng-container [ERROR ->]*ngFor="#item of items, #i = index">
            <li [ngClass]="{'active': item.active}">
                <a href="#{{item"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16 ("bs nav-justified control-sidebar-tabs">
        <ng-container *ngFor="#item of items, #i = index">
            <li [ERROR ->][ngClass]="{'active': item.active}">
                <a href="#{{item.id}}" data-toggle="tab">
                    <i class="fa "): ng:///NgxAdminLteModule/ControlSidebarComponent.html@9:7
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16 ("g-container *ngFor="#item of items, #i = index">
            <li [ngClass]="{'active': item.active}">
                <a [ERROR ->]href="#{{item.id}}" data-toggle="tab">
                    <i class="fa fa-{{item.icon}}"></i>
                </a>
"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@10:7
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16 ("
            <li [ngClass]="{'active': item.active}">
                <a href="#{{item.id}}" data-toggle="tab">
                    <i [ERROR ->]class="fa fa-{{item.icon}}"></i>
                </a>
            </li>
"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@11:8
Can't bind to 'ngFor' since it isn't a known property of 'ng-container'.
1. If 'ngFor' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.
2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("- Create the tabs -->
    <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
        <ng-container [ERROR ->]*ngFor="#item of items, #i = index">
            <li [ngClass]="{'active': item.active}">
                <a href="#{{item"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16 ("
    <!-- Tab panes -->
    <div class="tab-content">
        <ng-container [ERROR ->]*ngFor="#item of items, #i = index">
        <!-- Home tab content -->
        <div [ngClass]="{'active': item.ac"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@18:16
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@18:16 ("
    <!-- Tab panes -->
    <div class="tab-content">
        <ng-container [ERROR ->]*ngFor="#item of items, #i = index">
        <!-- Home tab content -->
        <div [ngClass]="{'active': item.ac"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@18:16
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16 ("
        <ng-container *ngFor="#item of items, #i = index">
        <!-- Home tab content -->
        <div [ERROR ->][ngClass]="{'active': item.active, 'tab-pane': true}" id="{{item.id}}">
            <ng-container *ngFor="#sub"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@20:7
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@18:16 ("
        <ng-container *ngFor="#item of items, #i = index">
        <!-- Home tab content -->
        <div [ERROR ->][ngClass]="{'active': item.active, 'tab-pane': true}" id="{{item.id}}">
            <ng-container *ngFor="#sub"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@20:7
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16 (" = index">
        <!-- Home tab content -->
        <div [ngClass]="{'active': item.active, 'tab-pane': true}" [ERROR ->]id="{{item.id}}">
            <ng-container *ngFor="#subitem of item.items, #i = index">
                <!-- COMPONENT --"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@20:61
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@18:16 (" = index">
        <!-- Home tab content -->
        <div [ngClass]="{'active': item.active, 'tab-pane': true}" [ERROR ->]id="{{item.id}}">
            <ng-container *ngFor="#subitem of item.items, #i = index">
                <!-- COMPONENT --"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@20:61
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16 ("-->
        <div [ngClass]="{'active': item.active, 'tab-pane': true}" id="{{item.id}}">
            <ng-container [ERROR ->]*ngFor="#subitem of item.items, #i = index">
                <!-- COMPONENT -->
                <ng-container *ngIf="subitem."): ng:///NgxAdminLteModule/ControlSidebarComponent.html@21:17
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@18:16 ("-->
        <div [ngClass]="{'active': item.active, 'tab-pane': true}" id="{{item.id}}">
            <ng-container [ERROR ->]*ngFor="#subitem of item.items, #i = index">
                <!-- COMPONENT -->
                <ng-container *ngIf="subitem."): ng:///NgxAdminLteModule/ControlSidebarComponent.html@21:17
Parser Error: Unexpected token # at column 1 in [#subitem of item.items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@21:17 ("-->
        <div [ngClass]="{'active': item.active, 'tab-pane': true}" id="{{item.id}}">
            <ng-container [ERROR ->]*ngFor="#subitem of item.items, #i = index">
                <!-- COMPONENT -->
                <ng-container *ngIf="subitem."): ng:///NgxAdminLteModule/ControlSidebarComponent.html@21:17
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16 ("<ng-container *ngFor="#subitem of item.items, #i = index">
                <!-- COMPONENT -->
                <ng-container [ERROR ->]*ngIf="subitem.class">
                    <li>
                        <app-component-loader [class_component]="subitem.class" [data]"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@23:18
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@18:16 ("<ng-container *ngFor="#subitem of item.items, #i = index">
                <!-- COMPONENT -->
                <ng-container [ERROR ->]*ngIf="subitem.class">
                    <li>
                        <app-component-loader [class_component]="subitem.class" [data]"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@23:18
Parser Error: Unexpected token # at column 1 in [#subitem of item.items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@21:17 ("<ng-container *ngFor="#subitem of item.items, #i = index">
                <!-- COMPONENT -->
                <ng-container [ERROR ->]*ngIf="subitem.class">
                    <li>
                        <app-component-loader [class_component]="subitem.class" [data]"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@23:18
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16 ("
                <ng-container *ngIf="subitem.class">
                    <li>
                        <app-component-loader [ERROR ->][class_component]="subitem.class" [data]="subitem.data"></app-component-loader>
                    </li>
                </ng-c"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@25:28
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@18:16 ("
                <ng-container *ngIf="subitem.class">
                    <li>
                        <app-component-loader [ERROR ->][class_component]="subitem.class" [data]="subitem.data"></app-component-loader>
                    </li>
                </ng-c"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@25:28
Parser Error: Unexpected token # at column 1 in [#subitem of item.items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@21:17 ("
                <ng-container *ngIf="subitem.class">
                    <li>
                        <app-component-loader [ERROR ->][class_component]="subitem.class" [data]="subitem.data"></app-component-loader>
                    </li>
                </ng-c"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@25:28
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16 ("iner *ngIf="subitem.class">
                    <li>
                        <app-component-loader [class_component]="subitem.class" [ERROR ->][data]="subitem.data"></app-component-loader>
                    </li>
                </ng-container>
"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@25:62
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@18:16 ("iner *ngIf="subitem.class">
                    <li>
                        <app-component-loader [class_component]="subitem.class" [ERROR ->][data]="subitem.data"></app-component-loader>
                    </li>
                </ng-container>
"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@25:62
Parser Error: Unexpected token # at column 1 in [#subitem of item.items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@21:17 ("iner *ngIf="subitem.class">
                    <li>
                        <app-component-loader [class_component]="subitem.class" [ERROR ->][data]="subitem.data"></app-component-loader>
                    </li>
                </ng-container>
"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@25:62
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16 ("
                    </li>
                </ng-container>
                <ng-container [ERROR ->]*ngIf="subitem.html">
                    {{ subitem.html | safeHtml }}
                </ng-container>
"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@28:18
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@18:16 ("
                    </li>
                </ng-container>
                <ng-container [ERROR ->]*ngIf="subitem.html">
                    {{ subitem.html | safeHtml }}
                </ng-container>
"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@28:18
Parser Error: Unexpected token # at column 1 in [#subitem of item.items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@21:17 ("
                    </li>
                </ng-container>
                <ng-container [ERROR ->]*ngIf="subitem.html">
                    {{ subitem.html | safeHtml }}
                </ng-container>
"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@28:18
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@8:16 ("
                    </li>
                </ng-container>
                <ng-container *ngIf="subitem.html">[ERROR ->]
                    {{ subitem.html | safeHtml }}
                </ng-container>
            </ng-container>
"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@28:39
Parser Error: Unexpected token # at column 1 in [#item of items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@18:16 ("
                    </li>
                </ng-container>
                <ng-container *ngIf="subitem.html">[ERROR ->]
                    {{ subitem.html | safeHtml }}
                </ng-container>
            </ng-container>
"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@28:39
Parser Error: Unexpected token # at column 1 in [#subitem of item.items, #i = index] in ng:///NgxAdminLteModule/ControlSidebarComponent.html@21:17 ("
                    </li>
                </ng-container>
                <ng-container *ngIf="subitem.html">[ERROR ->]
                    {{ subitem.html | safeHtml }}
                </ng-container>
            </ng-container>
"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@28:39
Can't bind to 'ngFor' since it isn't a known property of 'ng-container'.
1. If 'ngFor' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.
2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("-->
        <div [ngClass]="{'active': item.active, 'tab-pane': true}" id="{{item.id}}">
            <ng-container [ERROR ->]*ngFor="#subitem of item.items, #i = index">
                <!-- COMPONENT -->
                <ng-container *ngIf="subitem."): ng:///NgxAdminLteModule/ControlSidebarComponent.html@21:17
Can't bind to 'ngFor' since it isn't a known property of 'ng-container'.
1. If 'ngFor' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.
2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
    <!-- Tab panes -->
    <div class="tab-content">
        <ng-container [ERROR ->]*ngFor="#item of items, #i = index">
        <!-- Home tab content -->
        <div [ngClass]="{'active': item.ac"): ng:///NgxAdminLteModule/ControlSidebarComponent.html@18:16
    at syntaxError (webpack-internal:///./node_modules/@angular/compiler/esm2015/compiler.js:651)
    at TemplateParser.parse (webpack-internal:///./node_modules/@angular/compiler/esm2015/compiler.js:20391)
    at JitCompiler._parseTemplate (webpack-internal:///./node_modules/@angular/compiler/esm2015/compiler.js:28561)
    at JitCompiler._compileTemplate (webpack-internal:///./node_modules/@angular/compiler/esm2015/compiler.js:28543)
    at templates.forEach (webpack-internal:///./node_modules/@angular/compiler/esm2015/compiler.js:28466)
    at Set.forEach (<anonymous>)
    at JitCompiler._compileComponents (webpack-internal:///./node_modules/@angular/compiler/esm2015/compiler.js:28466)
    at SyncAsync.then (webpack-internal:///./node_modules/@angular/compiler/esm2015/compiler.js:28362)
    at Object.then (webpack-internal:///./node_modules/@angular/compiler/esm2015/compiler.js:640)
    at JitCompiler._compileModuleAndComponents (webpack-internal:///./node_modules/@angular/compiler/esm2015/compiler.js:28361)
fabioformosa commented 6 years ago

Me too with 2.0.0-beta.8. Instead nothing to report with 2.0.0-beta.7, it works for me.

catull commented 6 years ago

I got a fix prepared, will file a PR for it.

catull commented 6 years ago

Actually, now I see that there are follow-up errors, apparently the ToasterService is not known or provided. There are more runtime-errors.