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: 
**UPDATE** *Original question is about Angular 2 CLI. This doesn't work for curent Angular version!*

It depends but if you want to add routings to existing module then add folowing to your module.

```
import { Routes, RouterModule } from '@angular/router';

const routes: Routes = [];
//in array you should have your routes like 
// { path: "path",  component: ComponentName },

```

Then in NgModule where you have `imports` definition 

```
RouterModule.forRoot(routes, { useHash: true })

```

Or for child

```
RouterModule.forChild(routes)

```

Example for clean project

```
import { Routes, RouterModule } from '@angular/router';

const routes: Routes = [{ path: "path",  component: ComponentName }];
@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
  providers: []
})

```
**update on the accepted answer** 

make sure to follow below points:

**1>** 
make sure that `<base href="/">` is added inside index.html

```
    <html>
    <head>
    <base href="/" />
    <title>Angular Demo</title>

```

**2>**
Add router outlet in ur app.component.html file `<router-outlet></router-outlet>`

```
    div style="text-align:center">
    <h1>
    Welcome to MyApp
    </h1>
    <img width="300" alt="Angular Logo" src="data:image/svg+xml;....">
    </div>
    <router-outlet></router-outlet>

```

* router outlet tells the router where to display routed view.

**3>** Remember to add AppRoutingModule to the "imports" section of your @NgModule decorator in app.module.ts too

```
        @NgModule({
      imports: [
       AppRoutingModule
      ],
      declarations: [
        AppComponent,
      ],
      bootstrap: [ AppComponent ]
    })
    export class AppModule { }

```