{"id":2118,"date":"2018-02-12T17:52:55","date_gmt":"2018-02-12T17:52:55","guid":{"rendered":"https:\/\/ionicframework.com\/?p=2118"},"modified":"2018-02-12T22:21:06","modified_gmt":"2018-02-12T22:21:06","slug":"customizing-ionic-apps-for-web-mobile","status":"publish","type":"post","link":"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile","title":{"rendered":"Customizing Ionic Apps for Web &#038; Mobile"},"content":{"rendered":"<p><em>This is a guest post from Simon Grimm, speaker and educator at <a href=\"https:\/\/ionicacademy.com\" rel=\"noopener\" target=\"_blank\">Ionic Academy<\/a>. Simon writes about Ionic frequently on his blog <a href=\"https:\/\/devdactic.com\" rel=\"noopener\" target=\"_blank\">Devdactic<\/a>.<\/em><\/p>\n<p>With the development of Ionic apps comes the promise that your code will run on various platforms and screen sizes once it\u2019s ready. While this can work and look fine on your targeted devices out of the box, it might not at first for everyone.<\/p>\n<p>In this post, we&#8217;ll take a look at 4 areas to keep an eye on &#8211; especially if you plan to ship your Ionic app both as a <strong>website<\/strong> (<em>or perhaps <a href=\"https:\/\/ionicframework.com\/pwa\">PWA<\/a>?<\/em>) and also as a <strong>native mobile app<\/strong> (perhaps even on phone and tablet devices).<\/p>\n<p>Everything we need is already built into Ionic, but sometimes it&#8217;s easy to forget about all the awesomeness. So let\u2019s get started with a tiny base for our examples!<\/p>\n<p><!--more--><\/p>\n<h3>App Starting Template Setup<\/h3>\n<p>For this article run the command below to start a new Ionic app with the side menu template:<\/p>\n<pre><code class=\"bash\">ionic start devdacticResponsive sideMenu\n<\/code><\/pre>\n<p>It\u2019s a super basic app with just 2 pages and a side menu (otherwise the name would be kinda bad) but we also need to make HTTP calls, therefore we use the new <strong>HttpClient<\/strong> which is available since Angular 5 and Ionic 3.9.0.<\/p>\n<p>Simply change your <code>app\/app.module.ts<\/code> to:<\/p>\n<pre><code class=\"typescript\">import { BrowserModule } from &#039;@angular\/platform-browser&#039;;\nimport { ErrorHandler, NgModule } from &#039;@angular\/core&#039;;\nimport { IonicApp, IonicErrorHandler, IonicModule } from &#039;ionic-angular&#039;;\n\nimport { MyApp } from &#039;.\/app.component&#039;;\nimport { HomePage } from &#039;..\/pages\/home\/home&#039;;\nimport { ListPage } from &#039;..\/pages\/list\/list&#039;;\n\nimport { StatusBar } from &#039;@ionic-native\/status-bar&#039;;\nimport { SplashScreen } from &#039;@ionic-native\/splash-screen&#039;;\n\nimport { HttpClientModule } from &#039;@angular\/common\/http&#039;;\n\n@NgModule({\n declarations: [\n   MyApp,\n   HomePage,\n   ListPage\n ],\n imports: [\n   BrowserModule,\n   IonicModule.forRoot(MyApp),\n   HttpClientModule\n ],\n bootstrap: [IonicApp],\n entryComponents: [\n   MyApp,\n   HomePage,\n   ListPage\n ],\n providers: [\n   StatusBar,\n   SplashScreen,\n   {provide: ErrorHandler, useClass: IonicErrorHandler}\n ]\n})\nexport class AppModule {}\n<\/code><\/pre>\n<p>That\u2019s all we&#8217;ll need for our examples, so now let\u2019s dive into our areas.<\/p>\n<h3>1. Responsive Grid Layout<\/h3>\n<p>Most Ionic components already adapt to screen changes and look good across various sizes. However, having something like a <strong>list item full size<\/strong> or an Ionic Card displayed full width on my large iMac screen kills my eyes. \ud83d\ude35<\/p>\n<p>If you need your app to look good on a small device <em>and<\/em> in a desktop web browser, you&#8217;ll need to make it as responsive as possible. And what\u2019s better then using the <a href=\"https:\/\/ionicframework.com\/docs\/api\/components\/grid\/Grid\/\" target=\"_blank\">Ionic Grid<\/a> layout system?<\/p>\n<p>But first we need some data we can display inside a list, so let&#8217;s add a simple HTTP call to your <code>pages\/home\/home.ts<\/code> like this:<\/p>\n<pre><code class=\"typescript\">import { Component } from &#039;@angular\/core&#039;;\nimport { NavController } from &#039;ionic-angular&#039;;\nimport { Observable } from &#039;rxjs\/Observable&#039;;\nimport { HttpClient } from &#039;@angular\/common\/http&#039;;\nimport &quot;rxjs\/add\/operator\/map&quot;;\n\n@Component({\n selector: &#039;page-home&#039;,\n templateUrl: &#039;home.html&#039;\n})\nexport class HomePage {\n\n users: Observable&lt;any&gt;;\n\n constructor(public navCtrl: NavController, private httpClient: HttpClient, private plt: Platform, private alertCtrl: AlertController) {\n   this.users = this.httpClient.get(&#039;https:\/\/randomuser.me\/api\/?results=20&#039;)\n   .map(res =&gt; res[&#039;results&#039;])\n }\n}\n<\/code><\/pre>\n<p>Now we have an array of users from the <a href=\"https:\/\/randomuser.me\/\" rel=\"noopener\" target=\"_blank\">Randomuser API<\/a> which we can display as cards. You could make this as simple iteration without any further testing, but if you&#8217;re serious about your design (which, of course you are!), you&#8217;ll want to make sure to <strong>test different sizes and breakpoints<\/strong>.<\/p>\n<p>A breakpoint is a <a href=\"https:\/\/ionicframework.com\/docs\/api\/components\/grid\/Grid\/\" rel=\"noopener\" target=\"_blank\">predefined<\/a> value at which your design snaps from one category to the next. If your screen is smaller than 576px, you fall into the smallest category which is <strong>xs<\/strong>. However, at 577px your design will get the <strong>sm<\/strong> category applied, so you must prepare your design to also look good there, and at later breakpoints as well.<\/p>\n<p>With Ionic, we can use the row and column system plus the breakpoints to build interfaces that look great across different platforms and adapt to display the best and most intuitive interface to the user.<\/p>\n<p>Let\u2019s take our example and add this code to our <code>pages\/home\/home.html<\/code>:<\/p>\n<pre><code class=\"html\">&lt;ion-header&gt;\n &lt;ion-navbar&gt;\n   &lt;button ion-button menuToggle&gt;\n     &lt;ion-icon name=&quot;menu&quot;&gt;&lt;\/ion-icon&gt;\n   &lt;\/button&gt;\n   &lt;ion-title&gt;Home&lt;\/ion-title&gt;\n &lt;\/ion-navbar&gt;\n&lt;\/ion-header&gt;\n\n&lt;ion-content&gt;\n &lt;ion-grid&gt;\n   &lt;ion-row&gt;\n     &lt;ion-col *ngFor=&quot;let user of users | async&quot; col-12 col-xl-2 col-lg-3 col-md-4&gt;\n       &lt;ion-card&gt;\n         &lt;ion-item&gt;\n           &lt;ion-avatar item-start&gt;\n             &lt;img [src]=&quot;user.picture.medium&quot;&gt;\n           &lt;\/ion-avatar&gt;\n           &lt;h2 text-capitalize&gt;{{ user.name?.first }} {{ user.name?.last }}&lt;\/h2&gt;\n         &lt;\/ion-item&gt;\n         &lt;ion-card-content&gt;\n           Bacon ipsum dolor amet salami prosciutto ham hock, strip steak buffalo ribeye pork chop. Beef ribs tenderloin tail shoulder.\n           Spare ribs ham shoulder brisket rump hamburger. Pork belly kevin shoulder prosciutto ribeye pork chop chicken\n           strip steak pig.\n         &lt;\/ion-card-content&gt;\n       &lt;\/ion-card&gt;\n     &lt;\/ion-col&gt;\n   &lt;\/ion-row&gt;\n &lt;\/ion-grid&gt;\n&lt;\/ion-content&gt;\n<\/code><\/pre>\n<p>One Ionic row offers 12 units space for columns, so each column can take an amount of those 12. If your row takes 12 units, it means the row is already full and the next column will be displayed in the following row.<\/p>\n<p>The syntax for the column isn&#8217;t immediately obvious, so let\u2019s dive deeper into what it actually means:<\/p>\n<ul>\n<li>col-12: If no other rules match, the column will take all 12 units (greedy column!)<\/li>\n<li>col-md-4: At a minimum width of 768px, each column will only use 4 units. This means, a row can now handle 3 columns<\/li>\n<li>col-lg-3: As the screen gets bigger than 992px, a column only needs 3 units which means the row how holds 4 columns<\/li>\n<li>col-xl-2: On the largest screens (1200px+), a column only needs 2 units and a row will display 6 columns<\/li>\n<\/ul>\n<p>In our example, a column always holds a card, so the design ranges from seeing only 1 card to 6 cards maximum (seen below).<\/p>\n<p><a href=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/ionic-grid-resize.gif\"><img loading=\"lazy\" decoding=\"async\" width=\"1597\" height=\"679\" data-src=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/ionic-grid-resize.gif\" alt=\"\" class=\"aligncenter size-full wp-image-2119 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" style=\"--smush-placeholder-width: 1597px; --smush-placeholder-aspect-ratio: 1597\/679;\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"1597\" height=\"679\" src=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/ionic-grid-resize.gif\" alt=\"\" class=\"aligncenter size-full wp-image-2119\" \/><\/noscript><\/a><\/p>\n<p>Using a decent flexible layout is definitely mandatory if your app is going to run on multiple platforms and screen sizes. If you don\u2019t invest time into doing this, your app might scare off potential users because it just looks odd.<\/p>\n<p>There\u2019s <em>a lot<\/em> more to the Grid like setting your own breakpoints, reordering columns, and more so <a href=\"https:\/\/ionicframework.com\/docs\/api\/components\/grid\/Grid\" rel=\"noopener\" target=\"_blank\">go check it out!<\/a><\/p>\n<h3>2. CSS Media Queries<\/h3>\n<p>While we can\u2019t really accredit this one directly to Ionic, we are still lucky that Ionic bets strongly on the Web and we can thus take advantage of languages like CSS, which most of us have all learned years ago.<\/p>\n<p>Just like the grid layout, we can make use of breakpoints here as well by using <code>@media<\/code> and different sizes to change part of our UI.<\/p>\n<p>In a recent app, we needed an <code>ion-fab<\/code>button at the top right corner on the web version as it was too hard to spot when it was at the far bottom right corner. However, on a mobile version of your app users are already familiar with having the button floating above lists at the bottom right.<\/p>\n<p>This means the element needs exist in <strong>completely different places depending on screen size<\/strong> (and this is a simple element).<\/p>\n<p>One way to achieve this is by having the element there twice, but only displaying it when the media query of your CSS matches. To do this, add the Fab button to your your <code>pages\/home\/home.html<\/code> after the list we already have:<\/p>\n<pre><code class=\"html\">&lt;ion-fab right bottom class=&quot;web-fab&quot;&gt;\n &lt;button ion-fab icon-only color=&quot;primary&quot; (click)=&quot;checkPlatform()&quot;&gt;\n   &lt;ion-icon name=&quot;help&quot;&gt;&lt;\/ion-icon&gt;\n &lt;\/button&gt;\n&lt;\/ion-fab&gt;\n\n&lt;ion-fab right top edge class=&quot;mobile-fab&quot;&gt;\n &lt;button ion-fab icon-only color=&quot;primary&quot; (click)=&quot;checkPlatform()&quot;&gt;\n   &lt;ion-icon name=&quot;help&quot;&gt;&lt;\/ion-icon&gt;\n &lt;\/button&gt;\n&lt;\/ion-fab&gt;\n<\/code><\/pre>\n<p>If you want to make only one button visible, you could use the follow CSS inside your <code>pages\/home\/home.scss<\/code>:<\/p>\n<pre><code class=\"css\">page-home {\n   @media (max-width: 576px) {\n       ion-card-content {\n           font-size: 2rem !important;\n       }\n   }\n\n   @media (max-width: 820px) {\n       .mobile-fab {\n           display: none;\n       }\n   }\n\n   @media (min-width: 820px) {\n       .web-fab {\n           display: none;\n       }\n   }\n}\n<\/code><\/pre>\n<p>By using the media query you can of course do much more than hide and show elements by repositioning your elements. If you know where your elements should be exactly on the screen, you can also use just one element with the class.<\/p>\n<p>For this example I wanted to use the Ionic values <em>right bottom<\/em> and <em>top edge<\/em> therefore I added the element twice instead of manually setting the position of the button.<\/p>\n<p>With <a href=\"https:\/\/developer.mozilla.org\/de\/docs\/Web\/CSS\/Media_Queries\/Using_media_queries\" rel=\"noopener\" target=\"_blank\">media queries<\/a> you can customize the complete UI up to using a completely different UI for phone and tablet devices. It\u2019s good to have this tool in your toolbox.<\/p>\n<h2>3. Checking Your Platform<\/h2>\n<p>Not only do we have to think about the UI of our app on different platforms, we should also understand on which platform(s) our app is running.<\/p>\n<p>If your app runs inside a regular desktop browser you don\u2019t need to call the Push notification setup, and you especially <strong>don\u2019t want to make any calls to Cordova when running as a website<\/strong>!<\/p>\n<p>To prevent this, simply inject the <a href=\"https:\/\/ionicframework.com\/docs\/api\/platform\/Platform\/\" rel=\"noopener\" target=\"_blank\">Platform<\/a> whenever you need it and create checks to see on which platform you are running. As a test, open your <code>pages\/home\/home.ts<\/code> and change it to:<\/p>\n<pre><code class=\"typescript\">import { Component } from &#039;@angular\/core&#039;;\nimport { NavController } from &#039;ionic-angular&#039;;\nimport { Observable } from &#039;rxjs\/Observable&#039;;\nimport { HttpClient } from &#039;@angular\/common\/http&#039;;\nimport &quot;rxjs\/add\/operator\/map&quot;;\nimport { Platform } from &#039;ionic-angular\/platform\/platform&#039;;\nimport { AlertController } from &#039;ionic-angular\/components\/alert\/alert-controller&#039;;\n\n@Component({\n selector: &#039;page-home&#039;,\n templateUrl: &#039;home.html&#039;\n})\nexport class HomePage {\n\n users: Observable&lt;any&gt;;\n\n constructor(public navCtrl: NavController, private httpClient: HttpClient, private plt: Platform, private alertCtrl: AlertController) {\n   this.users = this.httpClient.get(&#039;https:\/\/randomuser.me\/api\/?results=20&#039;)\n   .map(res =&gt; res[&#039;results&#039;])\n }\n\n checkPlatform() {\n   let alert = this.alertCtrl.create({\n     title: &#039;Platform&#039;,\n     message: &#039;You are running on: &#039; + this.plt.platforms(),\n     buttons: [&#039;OK&#039;]\n   });\n   alert.present();\n\n   if (this.plt.is(&#039;cordova&#039;)) {\n     \/\/ Do Cordova stuff\n   } else {\n     \/\/ Do stuff inside the regular browser\n   }\n }\n}\n<\/code><\/pre>\n<p>By checking <code>this.plt.is(&#039;cordova&#039;)<\/code> you can be sure that Cordova is available to your app, but you could also test for iOS \/ Android if you have specific code for those platforms.<\/p>\n<p>One feature that\u2019s especially different on a device and desktop browser is <strong>files<\/strong>. Inside your native app you will have a completely different file object (most of the time path to your app) then when you implement file upload for a browser.<\/p>\n<p>If your app doesn\u2019t need the feature on one or the other platform, no problem! But be aware that you have to keep an eye on testing your features on all targeted platforms to make sure everything\u2019s working as planned.<\/p>\n<h2>4. Ionic Split Pane<\/h2>\n<p>One feature thing that makes desktop UI ready in seconds is the <a href=\"https:\/\/ionicframework.com\/docs\/api\/components\/split-pane\/SplitPane\/\" rel=\"noopener\" target=\"_blank\">Ionic Split Pane<\/a>.<\/p>\n<p>We&#8217;ve already started an app with a side menu, so we only need to apply minimal changes to achieve a flexible dynamic UI that adapts to the screen size and automatically shows \/ hides our side menu.<\/p>\n<p>Combine this approach with some CSS, and you get a (more or less) great looking web UI for your app. Don\u2019t hate my color choices, this example is not about how I never became the designer I dreamed to be. \ud83d\ude02<\/p>\n<p>So here\u2019s what you need to change for your Split Pane inside the <code>app\/app.html<\/code>:<\/p>\n<pre><code class=\"html\">&lt;ion-split-pane when=&quot;sm&quot;&gt;\n\n &lt;ion-menu [content]=&quot;content&quot;&gt;\n   &lt;ion-header&gt;\n     &lt;ion-toolbar color=&quot;secondary&quot;&gt;\n       &lt;ion-title&gt;Menu&lt;\/ion-title&gt;\n     &lt;\/ion-toolbar&gt;\n   &lt;\/ion-header&gt;\n\n   &lt;ion-content class=&quot;menu-container&quot;&gt;\n     &lt;ion-list no-lines&gt;\n       &lt;button menuClose ion-item *ngFor=&quot;let p of pages&quot; (click)=&quot;openPage(p)&quot; class=&quot;transparent list-item&quot;&gt;\n         {{p.title}}\n       &lt;\/button&gt;\n     &lt;\/ion-list&gt;\n   &lt;\/ion-content&gt;\n\n &lt;\/ion-menu&gt;\n\n &lt;!-- Disable swipe-to-go-back because it&#039;s poor UX to combine STGB with side menus --&gt;\n &lt;ion-nav [root]=&quot;rootPage&quot; #content main swipeBackEnabled=&quot;false&quot;&gt;&lt;\/ion-nav&gt;\n &lt;\/ion-split-pane&gt;\n<\/code><\/pre>\n<p>With the side menu template, our menu is directly at the top of the app. Normally this would be perhaps in a later page (after a login) and therefore also the CSS would be in a different place.<\/p>\n<p>For this example, we have to fit our additional CSS into the <code>app\/app.scss<\/code> with some colors and changes to make the menu look more natural on the web:<\/p>\n<pre><code class=\"css\">&lt;br \/&gt;.split-pane-side {\n   border-right: 0px !important;\n}\n\n.menu-container {\n   background-color: color($colors, secondary);\n}\n\n.transparent {\n   background: transparent;\n}\n\n.list-item {\n   color: #ffffff;\n   margin-bottom: 10px;\n   font-size: 2rem;\n}\n\n:hover.list-item {\n   background: #2e8015;\n}\n\n.scroll-content{\n   overflow: hidden;\n   margin-right: -17px;\n   overflow-y: scroll;\n}\n<\/code><\/pre>\n<p>The standard UI doesn\u2019t look that good for a website, but of course with some CSS, colors, and hover effects (which you don\u2019t really need for a mobile app) you can make the menu look like a standard menu you&#8217;re familiar with.<\/p>\n<p><a href=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/ionic-grid-resize-split-pane.gif\"><img loading=\"lazy\" decoding=\"async\" width=\"1597\" height=\"679\" data-src=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/ionic-grid-resize-split-pane.gif\" alt=\"\" class=\"aligncenter size-full wp-image-2120 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" style=\"--smush-placeholder-width: 1597px; --smush-placeholder-aspect-ratio: 1597\/679;\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"1597\" height=\"679\" src=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/ionic-grid-resize-split-pane.gif\" alt=\"\" class=\"aligncenter size-full wp-image-2120\" \/><\/noscript><\/a><\/p>\n<p>To further customise your Split Pane, you can override Ionic variables inside the <code>theme\/variables.scss<\/code> so simply add this:<\/p>\n<pre><code class=\"css\">$split-pane-side-max-width: 12%;\n<\/code><\/pre>\n<p>Now your side menu won\u2019t expand too far, and even look nice even on big screens!<\/p>\n<h3>Conclusion<\/h3>\n<p>It\u2019s already epic to have one code base that can be built into a native mobile app and also be deployed to the web, but the flexibility of using some CSS and responsive items makes Ionic the perfect choice for both your next web application, PWA and mobile app!<\/p>\n<p>To learn more about everything Ionic, check out <a href=\"https:\/\/ionicacademy.com\" rel=\"noopener\" target=\"_blank\">the Ionic Academy<\/a>, which offers a ton of courses on all related topics, projects to apply your knowledge in, and also a dedicated community with help for all your questions!<\/p>\n<p>Good luck, and happy building!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a guest post from Simon Grimm, speaker and educator at Ionic Academy. Simon writes about Ionic frequently on his blog Devdactic. With the development of Ionic apps comes the promise that your code will run on various platforms and screen sizes once it\u2019s ready. While this can work and look fine on your [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":2123,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"publish_to_discourse":"","publish_post_category":"","wpdc_auto_publish_overridden":"","wpdc_topic_tags":"","wpdc_pin_topic":"","wpdc_pin_until":"","discourse_post_id":"","discourse_permalink":"","wpdc_publishing_response":"","wpdc_publishing_error":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[87,23,25],"class_list":["post-2118","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-all","tag-desktop","tag-framework","tag-tutorials"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.0 (Yoast SEO v23.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Customizing Ionic Apps for Web &amp; Mobile - Ionic Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Customizing Ionic Apps for Web &amp; Mobile\" \/>\n<meta property=\"og:description\" content=\"This is a guest post from Simon Grimm, speaker and educator at Ionic Academy. Simon writes about Ionic frequently on his blog Devdactic. With the development of Ionic apps comes the promise that your code will run on various platforms and screen sizes once it\u2019s ready. While this can work and look fine on your [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile\" \/>\n<meta property=\"og:site_name\" content=\"Ionic Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-12T17:52:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-02-12T22:21:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/mobile-and-desktop-img.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1400\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Simon Grimm\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@schlimmson\" \/>\n<meta name=\"twitter:site\" content=\"@ionicframework\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Simon Grimm\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#article\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile\"},\"author\":{\"name\":\"Simon Grimm\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/24d44b251756bd6488dcb741eec0bef6\"},\"headline\":\"Customizing Ionic Apps for Web &#038; Mobile\",\"datePublished\":\"2018-02-12T17:52:55+00:00\",\"dateModified\":\"2018-02-12T22:21:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile\"},\"wordCount\":1583,\"commentCount\":19,\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/mobile-and-desktop-img.jpg\",\"keywords\":[\"Desktop\",\"Framework\",\"Tutorials\"],\"articleSection\":[\"All\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile\",\"url\":\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile\",\"name\":\"Customizing Ionic Apps for Web & Mobile - Ionic Blog\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/mobile-and-desktop-img.jpg\",\"datePublished\":\"2018-02-12T17:52:55+00:00\",\"dateModified\":\"2018-02-12T22:21:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#primaryimage\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/mobile-and-desktop-img.jpg\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/mobile-and-desktop-img.jpg\",\"width\":1400,\"height\":680},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ionic.io\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Customizing Ionic Apps for Web &#038; Mobile\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ionic.io\/blog\/#website\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"name\":\"ionic.io\/blog\",\"description\":\"Build amazing native and progressive web apps with the web\",\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ionic.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ionic.io\/blog\/#organization\",\"name\":\"Ionic\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"width\":1920,\"height\":854,\"caption\":\"Ionic\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/ionicframework\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/24d44b251756bd6488dcb741eec0bef6\",\"name\":\"Simon Grimm\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/08\/simon-150x150.jpg\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/08\/simon-150x150.jpg\",\"caption\":\"Simon Grimm\"},\"sameAs\":[\"https:\/\/x.com\/schlimmson\"],\"url\":\"https:\/\/ionic.io\/blog\/author\/schlimmson\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Customizing Ionic Apps for Web & Mobile - Ionic Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile","og_locale":"en_US","og_type":"article","og_title":"Customizing Ionic Apps for Web & Mobile","og_description":"This is a guest post from Simon Grimm, speaker and educator at Ionic Academy. Simon writes about Ionic frequently on his blog Devdactic. With the development of Ionic apps comes the promise that your code will run on various platforms and screen sizes once it\u2019s ready. While this can work and look fine on your [&hellip;]","og_url":"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile","og_site_name":"Ionic Blog","article_published_time":"2018-02-12T17:52:55+00:00","article_modified_time":"2018-02-12T22:21:06+00:00","og_image":[{"width":1400,"height":680,"url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/mobile-and-desktop-img.jpg","type":"image\/jpeg"}],"author":"Simon Grimm","twitter_card":"summary_large_image","twitter_creator":"@schlimmson","twitter_site":"@ionicframework","twitter_misc":{"Written by":"Simon Grimm","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#article","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile"},"author":{"name":"Simon Grimm","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/24d44b251756bd6488dcb741eec0bef6"},"headline":"Customizing Ionic Apps for Web &#038; Mobile","datePublished":"2018-02-12T17:52:55+00:00","dateModified":"2018-02-12T22:21:06+00:00","mainEntityOfPage":{"@id":"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile"},"wordCount":1583,"commentCount":19,"publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"image":{"@id":"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/mobile-and-desktop-img.jpg","keywords":["Desktop","Framework","Tutorials"],"articleSection":["All"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile","url":"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile","name":"Customizing Ionic Apps for Web & Mobile - Ionic Blog","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#primaryimage"},"image":{"@id":"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/mobile-and-desktop-img.jpg","datePublished":"2018-02-12T17:52:55+00:00","dateModified":"2018-02-12T22:21:06+00:00","breadcrumb":{"@id":"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#primaryimage","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/mobile-and-desktop-img.jpg","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/mobile-and-desktop-img.jpg","width":1400,"height":680},{"@type":"BreadcrumbList","@id":"https:\/\/ionic.io\/blog\/customizing-ionic-apps-for-web-mobile#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ionic.io\/blog"},{"@type":"ListItem","position":2,"name":"Customizing Ionic Apps for Web &#038; Mobile"}]},{"@type":"WebSite","@id":"https:\/\/ionic.io\/blog\/#website","url":"https:\/\/ionic.io\/blog\/","name":"ionic.io\/blog","description":"Build amazing native and progressive web apps with the web","publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ionic.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ionic.io\/blog\/#organization","name":"Ionic","url":"https:\/\/ionic.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","width":1920,"height":854,"caption":"Ionic"},"image":{"@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/ionicframework"]},{"@type":"Person","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/24d44b251756bd6488dcb741eec0bef6","name":"Simon Grimm","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/08\/simon-150x150.jpg","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/08\/simon-150x150.jpg","caption":"Simon Grimm"},"sameAs":["https:\/\/x.com\/schlimmson"],"url":"https:\/\/ionic.io\/blog\/author\/schlimmson"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/02\/mobile-and-desktop-img.jpg","_links":{"self":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/2118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/comments?post=2118"}],"version-history":[{"count":0,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/2118\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media\/2123"}],"wp:attachment":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media?parent=2118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/categories?post=2118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/tags?post=2118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}