Hello,
I am new to Ionic 4 and I am having problems generating my first component.
I use the following command to generate it:
ionic generate component bp-toolbar
It genrerate following files:
bp-toolbar.component.html
bp-toolbar.component.scss
bp-toolbar.component.spec.ts
bp-toolbar.component.ts
I can see inside spec file:
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { BpToolbarPage } from './bp-toolbar.page';
describe('BpToolbarPage', () => {
let component: BpToolbarPage;
let fixture: ComponentFixture<BpToolbarPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BpToolbarPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BpToolbarPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
but it tries to import bp-toolbar.page which doesn’t exist.
ionic info:
Ionic:
ionic (Ionic CLI) : 4.5.0 (/usr/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.2
@angular-devkit/build-angular : 0.12.4
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.2.4
@ionic/angular-toolkit : 1.4.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : none
Cordova Plugins : no whitelisted plugins (3 plugins total)
System:
Android SDK Tools : 26.1.1 (/root/Android/Sdk)
NodeJS : v11.3.0 (/usr/bin/node)
npm : 6.4.1
OS : Linux 4.9
May it be a bug?
Regards