Hi
I think that you can generate 2 separate builds of your project, one with material design and the other with ios template. Then check where the request is coming from, I believe that IPad and IPhone are visible in the user agent http header (Not sure but you have to check). Then serve the build that is suitable for that platform.
Hope this helps.