As I am build the APK with --prod I am getting the error below
ERROR Error: StaticInjectorError[e -> t]:
StaticInjectorError(Platform:
This happens because you did not add the services used to build the module
example:
1. component
@Component({
selector: 'app-sample',
templateUrl: './sample.component.html',
styleUrls: ['./sample.component.scss']
})
export class SampleComponent implements OnInit {
constructor(private localServiceName: YourService) {
}
ngOnInit() {
}
}
2. module
@NgModule({
declarations: [SampleComponent]
})
change to
@NgModule({
declarations: [SampleComponent]
providers: [ YourService ]
})