New page in ionic2


#1

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’


#2

try

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


#3

I tried but nothing. Thank you.


#4

ok…you can try

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


#5

Ok it works, thank you.