Currently, I am facing an issue while trying to print data from a constructor. Everything is working fine until I added col-3
to ion-col
. It seems like I missed including some module, but I am not sure which one.
This is my home.ts file:
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
dni: any;
constructor(public navCtrl: NavController) {
this.dni = {
// Data here
}
}
}
<ion-header>
<ion-navbar>
<ion-title>Home</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<ion-grid *ngIf="dni">
<ion-row>
<ion-col col-3>
// Content goes here
</ion-col>
</ion-row>
</ion-grid>
</ion-content>
This is the portion of my app.module.ts where the error occurs:
import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
@NgModule({
// Module details here
})
export class AppModule {}
The specific error message I encounter is:
Error: Template parse errors: Unexpected character "c" ("<ion-col col-3> Wtorek: </ion-col [ERROR ->]col-3>"): ng:///AppModule/HomePage.html@11:20
. This happens for every instance of col-3
that I add. Any suggestions on what might be causing this issue?