Question: How do I create an APK installer for mobile without the react native simulator? This is what happened when I tried to install the APK on Android.

[![enter image description here](https://i.stack.imgur.com/MJ179.png)](https://i.stack.imgur.com/MJ179.png)

Answer: 
In Angular 5/6 you can use these commands to add routing to an existing project.

1. `ng generate module app-routing --flat --module=app`

--flat puts the file in src/app instead of its own folder.
--module=app tells the CLI to register it in the imports array of the AppModule.

This will generate the file `src/app/app-routing.module.ts` for you.

2. Now inside `src/app/app-routing.module.ts` you have to import the router code:

import { RouterModule, Routes } from '@angular/router';
3. Further, edit `src/app/app-routing.module.ts` to look like this:

```
    import { RouterModule, Routes, Router } from '@angular/router';
    import {class name} from 'address your component Component';
    const routes: Routes = [
      { path: '/home' , component : yourComponenetName}
    ];
    @NgModule({
      imports: [
        RouterModule.forRoot(routes)
      ],
      exports: [ RouterModule ]
    })
    export class AppRoutingModule { } 

```

4. Next, add the `router-outlet` tag to your `app.html` file to tell the router where to display routed views.

```
    <router-outlet></router-outlet>

```

5. Additionally, you should check in an `index.html` file with this tag at the top.

```
    <base href="/"> 

```

It will be added directly if you use the CLI command that I mention above.
it is not explain if you currently has some router declared in your application, any way you can add routing in any moment. 

It is not possible using the command --**ng int --routing** because was eliminated. and the routing option is only available when you running the new command, that create a new solution.

But you can create manually it. if you have some router in your app.module or none, you can follow the step described here to generate it:
[Implementing routing in separate module in angular](https://www.youtube.com/watch?v=LEB9RUCM1m8&list=PL6n9fhu94yhWUcq5Pc16uf8YKXoZ87Vh_&index=19)