When I try a new app and use ionic serve command, I get a blank template on browser.
It says " World is your oyster "
But when I go ahead and make changes in index.html , there is no update on http://localhost:8100/
It still shows the " World is your oyster " content. What to do ?
Hi!
Have you followed what’s in the tutorial section of the Ionic Docs?
I don’t think the index.html you mentioned is a good place to start.
The Ionic Docs are very well designed and informative and they should be the first place to look for answers.
1 Like
I am not sure where to look. Can you please tell me which files to edit ? I have used index.html and a .js file while using Ionic 1. I am quite new to Ionic 2. Thanks.
For Ionic 2, action is taking place in src directory. More precicely in src/app and src/pages. Check src/app/app.html. There’s also a great tutorial in the INTRO section of the Documents in ionicframework.com.
1 Like
This is what I see at app.html in src directory
<ion-nav [root]="rootPage"></ion-nav>
I checked the Tutorials section. Still confused. Ionic 1 was straight forward. Edit index.html and app.js
Mostly because Angular 2 is different from Angular 1. Also certain parts of Ionic where re-written and re-designed. Anyway, you can create a page with the command
ionic generate page Page1
and link it for display in src/app/app.component.ts in the place of the HomePage or whatever other page. Then edit page1.html for the content you want and page1.ts for the logic and variables and whatever else. Those files are in the src/pages/page1 directory if you enter the above command.
1 Like
Is there any good video on YouTube to familiarize Ionic 2 ?