Better way to build a web app and mobile app?

hello, everyone .

I’m starting to build a frontend of my new project where the backend will be create with Java and play Framework giving me API with JSON.

I want to achieve to build a good architecture to reuse code so I am thinking to build that using Angular 5 , Ionic 3(mobile app) and HTML5 and CSS3(Web app). Angular 5 will be used for both.

Anyone have experience with this topic to achieve that avoiding complexibility and achieve modularize also ?

I’ve researched about that and I saw this : https://medium.com/@benorama/sharing-ngrx-based-logic-between-angular5-web-app-and-ionic3-mobile-app-77c19470cccc

Thank you in advance.