New page in ionic2

I created a new page with ‘ionic g page MyPage’ then i inserted in my ‘getting-started’ page this code:

import {MyPagePage} from './pages/my-page/my-page';

But when i run ‘ionic run android’ i receive this:

Error: Cannot find module ‘./pages/my-page/my-page’ from ‘C:\Users\asus\Desktop\myproject\app\pages\getting-started’

try

‘…/pages/my-pages/my-pages’;

I tried but nothing. Thank you.

ok…you can try

import {ClassName} from ‘…/my-pages/my-pages’;

Ok it works, thank you.

1 Like