Generate page dies in RC0?


#1

Hi,

When I create a new app using the Ionic “tutorial” skeleton, then generate a new page, it dies.

ionic start TestApp tutorial --v2
cd TestApp/
ionic generate page Killer
ionic serve -l

Everything’s good to this point, but when you try to link the Killer page in src/app/app.component.ts

import { Killer } from '../pages/killer/killer';
...
this.pages = [
        { title: 'This will kill the app', component: Killer },
        { title: 'Hello Ionic', component: HelloIonicPage },
        { title: 'My First List', component: ListPage }
    ];

I get the error

error_handler.js:47EXCEPTION: Error in ./MyApp class MyApp - inline template:18:0 caused by: No component factory found for Killer

Any help would be appreciated. I’m a little lost with all the changes in RC0.

Thanks,
Ryan


#2

If anyone else finds this error, the solution is that you now need to add the component into both

app.component.ts and app.module.ts