Adding ionic application to angular workspace

I am using angular 7.0.
How do I add ionic application and do ionic serve.
I tried the following

  • ng new sample1
  • cd sample1
  • ng generate application ionic4main
  • ng add @ionic/angular
  • cd project/ionic4main

I run ionic serve. It say,
‘you should have ionic.config.json’
I copied from my another project.

I run ionic serve. Now it says
[ERROR] Sorry! ionic serve can only be run in an Ionic project directory.

Hi, @rajeshvs
First, you need to install ionic CLI

npm install -g ionic

then for creating project

ionic start projectname

then go to the project directory using cd projectname
now you can run your project using ionic serve