Closed fizdalf closed 7 years ago
I am also getting exact same error.
OK, guess we need to update for RC4. We do accept pull requests!
On 16 Dec 2016 23:44, "sf1234" notifications@github.com wrote:
I am also getting exact same error.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lathonez/clicker/issues/197#issuecomment-267723150, or mute the thread https://github.com/notifications/unsubscribe-auth/AG5tSFrcDXW1eFwYv9ixurNSI-2dQwwXks5rIyJcgaJpZM4LPhcE .
I've made a start on upgrading to rc4 and ng-cli 22-1. Ionic have broken the tutorial project that clicker was initially forked from which is making things slow going.
Have replicated this mid rc4 upgrade
ERROR in ./src/pages/clickerList/clickerList.ts
Module not found: Error: Can't resolve 'clickerList.html' in '/home/lathonez/code/clicker/src/pages/clickerList'
@ ./src/pages/clickerList/clickerList.ts 9:3132-3159
@ ./src/pages/index.ts
@ ./src/app/app.component.ts
@ ./src/app/app.spec.ts
@ ./src \.spec\.ts
@ ./src/test.ts
The template urls need the current working directory added into the path.
For example:
templateUrl: 'hello-ionic.html',
becomes
templateUrl: './hello-ionic.html',
This must have been a change in ng-cli, seems to be this: https://github.com/angular/angular-cli/commit/27a034d
Had a look for a way around this and seems there isn't one.
I follow your guide, except I have Ionic 2 RC4, and karma is running, but it cannot resolve the html files.
ERROR in ./src/pages/hello-ionic/hello-ionic.ts Module not found: Error: Can't resolve 'hello-ionic.html' in 'E:\proyectos\Pavillion Web\BrightonAndHove\app2\src\pages\hello-ionic' @ ./src/pages/hello-ionic/hello-ionic.ts 9:2738-2765 @ ./src/pages/hello-ionic/hello-ionic.spec.ts @ ./src .spec.ts @ ./src/test.ts
I'm using the Ionic 2 tutorial template created with "ionic folder tutorial --v2", and the test file I created is as follows:
import {ComponentFixture, async} from "@angular/core/testing"; import {HelloIonicPage} from "./hello-ionic"; import {TestUtils} from "../../test";
let fixture: ComponentFixture = null;
let instance: any = null;
describe('Pages: HelloIconic', () => { beforeEach(async(() => TestUtils.beforeEachCompiler([HelloIonicPage]).then(compiled => { fixture = compiled.fixture; instance = compiled.instance; })));
it('should create the hello ionic page', async(() => { expect(instance).toBeTruthy(); })); });