You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m trying to use the module with Ionic v4. The module was installed with npm.
Creating a new blank project and following the installation steps I got some problems. First with some missing components that I was able to fix manually changing the imports of some files, just like in this question. I see that the module was updated to Ionic v4, but this imports are still linking with the ionic v3 structure, is this a currently problem or the npm package is outdated?
After that I got this other error:
ERROR Error: Uncaught (in promise): Error: Template parse errors:
Can't bind to 'ngIf' since it isn't a known property of 'div'. ("
<div [ERROR ->]*ngIf="tooltipHtml; else txt" [innerHTML]="tooltipHtml"></div>
<ng-template #txt>{{ text }}</ng-t"): ng:///TooltipsModule/TooltipBox.html@1:9
Can't bind to 'ngIfElse' since it isn't a known property of 'div'. ("
<div [ERROR ->]*ngIf="tooltipHtml; else txt" [innerHTML]="tooltipHtml"></div>
<ng-template #txt>{{ text }}</ng-t"): ng:///TooltipsModule/TooltipBox.html@1:9
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 ->]<div *ngIf="tooltipHtml; else txt" [innerHTML]="tooltipHtml"></div>
<ng-template #txt>{{ text }}<"): ng:///TooltipsModule/TooltipBox.html@1:4
Property binding ngIfElse 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 ->]<div *ngIf="tooltipHtml; else txt" [innerHTML]="tooltipHtml"></div>
<ng-template #txt>{{ text }}<"): ng:///TooltipsModule/TooltipBox.html@1:4
Error: Template parse errors:
Can't bind to 'ngIf' since it isn't a known property of 'div'. ("
<div [ERROR ->]*ngIf="tooltipHtml; else txt" [innerHTML]="tooltipHtml"></div>
<ng-template #txt>{{ text }}</ng-t"): ng:///TooltipsModule/TooltipBox.html@1:9
Can't bind to 'ngIfElse' since it isn't a known property of 'div'. ("
<div [ERROR ->]*ngIf="tooltipHtml; else txt" [innerHTML]="tooltipHtml"></div>
<ng-template #txt>{{ text }}</ng-t"): ng:///TooltipsModule/TooltipBox.html@1:9
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 ->]<div *ngIf="tooltipHtml; else txt" [innerHTML]="tooltipHtml"></div>
<ng-template #txt>{{ text }}<"): ng:///TooltipsModule/TooltipBox.html@1:4
After some searching I got some awnsers that converged to the same solution: Import Ionic CommonModule to the main Module. I did this, no success.
My home.page.html:
<ion-content>
<ion-button tooltip="I'm a tooltip below a button" positionV="bottom" arrow>
Press me to see a tooltip
</ion-button>
</ion-content>
home.module.ts:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { IonicModule } from '@ionic/angular';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { HomePage } from './home.page';
import { TooltipsModule } from 'ionic-tooltips';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild([
{
path: '',
component: HomePage
}
]),
TooltipsModule.forRoot()
],
declarations: [HomePage]
})
export class HomePageModule {}
app.module.ts (where I lastly tried to import CommonModule):
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@NgModule({
declarations: [AppComponent],
entryComponents: [],
imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule, BrowserAnimationsModule],
providers: [
StatusBar,
SplashScreen,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
],
bootstrap: [AppComponent]
})
export class AppModule {}
If there is any missing info, please ask.
The text was updated successfully, but these errors were encountered:
I’m trying to use the module with Ionic v4. The module was installed with npm.
Creating a new blank project and following the installation steps I got some problems. First with some missing components that I was able to fix manually changing the imports of some files, just like in this question. I see that the module was updated to Ionic v4, but this imports are still linking with the ionic v3 structure, is this a currently problem or the npm package is outdated?
After that I got this other error:
After some searching I got some awnsers that converged to the same solution: Import Ionic CommonModule to the main Module. I did this, no success.
My home.page.html:
home.module.ts:
app.module.ts (where I lastly tried to import CommonModule):
If there is any missing info, please ask.
The text was updated successfully, but these errors were encountered: