ionic framework - Deploy ionic2 mobile application as a Web application -
i want provide different css ionic2 mobile , web. example: list differs in width , height mobile , web application, list font , alignment different mobile , web. please let me know how achieve ionic2 mobile application.
thanks,
you can achieve injecting platform ionic-angular , using ngclass , boolean flag assign appropiate class each platform.
import { platform } 'ionic-angular'; ismobile: boolean; constructor(platform: platform) { platform.ready().then(() => this.ismobile = platform.is('mobile')); }
and on html:
<div [ngclass]="{'mobile-css': ismobile, 'web-css': !ismobile}"> </div>
Comments
Post a Comment