<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Modus Create: Front End Development - Medium]]></title>
        <description><![CDATA[Tutorials, tips, and walk-throughs on web &amp; mobile enterprise applications. JavaScript, HTML5, ReactJS, React Native, Angular, iOS, Android. From the developers at www.moduscreate.com - Medium]]></description>
        <link>https://medium.com/modus-create-front-end-development?source=rss----672b4ec5a5c7---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Modus Create: Front End Development - Medium</title>
            <link>https://medium.com/modus-create-front-end-development?source=rss----672b4ec5a5c7---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 31 May 2026 18:22:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/modus-create-front-end-development" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Using Ionic 4 in Vue applications with BEEP]]></title>
            <link>https://medium.com/modus-create-front-end-development/using-ionic-4-in-vue-applications-with-beep-d66f0851d419?source=rss----672b4ec5a5c7---4</link>
            <guid isPermaLink="false">https://medium.com/p/d66f0851d419</guid>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[vue]]></category>
            <category><![CDATA[ionic4]]></category>
            <category><![CDATA[ionic]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Modus Create, Inc.]]></dc:creator>
            <pubDate>Fri, 12 Oct 2018 17:31:04 GMT</pubDate>
            <atom:updated>2019-02-21T20:33:21.045Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0JA9i0qaPq9eDAJV" /></figure><p>We are excited to announce the immediate availability of BEEP, a mobile credential security tool on <a href="https://itunes.apple.com/us/app/beep-account-security-scanner/id1434675665?ls=1&amp;mt=8">App Store</a> and <a href="https://play.google.com/store/apps/details?id=app.modus.beep">Google Play</a>. BEEP will let you know if your username, email, or password have been compromised in a data breach by integrating with a 3d-party REST API service.</p><p>BEEP is the first production application that combines beautifully themed <strong>Ionic 4 web components in a Vue.js application</strong>. Modus Create made this Lab experiment publicly available for free on <a href="https://github.com/ModusCreateOrg/beep/">GitHub</a>.</p><h3>Ionic in Vue</h3><p>Ionic is a gorgeous UI component library frequently used in Angular applications. The new version 4 has been completely rewritten as framework-agnostic Web Components, which opens up a plethora of opportunities for applications written in other frameworks and libraries.</p><p>Ionic 4 immediately became a top-notch option for Vue.JS applications. One of the core values at <a href="https://labs.moduscreate.com/?utm_source=Medium">Modus Labs</a> is giving back to the open source community, and we immediately recognized a wonderful opportunity to help connect two vibrant communities. In an effort to identify where this combo shines and how Modus Create can use it in mission-critical apps, we developed a hybrid PWA application called BEEP.</p><p><strong>It took just minutes to start using Ionic components in a Vue application </strong>bootstrapped with Vue CLI. Obviously, this was a proof of concept, but we fell in love with it and continued utilizing both Ionic and Vue to deliver even better user experiences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZHZE-WvO1lSU4JYv" /><figcaption><em>Ionic in Vue DevTools</em></figcaption></figure><p>Integrating Ionic APIs and delegating navigation to Vue Router was instrumental in getting advanced components such as Modals, Menus, Popovers, and hardware back-button to work. To maintain a modular codebase, we decoupled the integration bridge into a separate library. <a href="https://github.com/ModusCreateOrg/ionic-vue">Ionic-Vue</a> library allows developers to get up and running with Ionic in a Vue application in under a minute.</p><blockquote><em>Getting started with Ionic in a Vue application took just two lines of code.</em></blockquote><p>Since the library was developed alongside the BEEP application, we were able to not only achieve feature parity and one-to-one API translation when compared to Angular, but also focus on usability and ease of integration.</p><p>Ionic-Vue extends the existing official Vue Router meaning that the developers can leverage prior experience and knowledge without having to learn a new API. The Ionic-Vue Router supports all original functionalities as well as advanced ones like named routes and lazy loading. Custom direction logic enables the app to display platform-specific Ionic transition animations. HTML5 history is fully supported to provide Ionic with custom logic for the display of the back-button within the toolbar component.</p><p>By going one step further and utilizing Webpack’s advanced features, developers can pass lazy-loaded components to the Ionic APIs which are handled behind the scenes by the Ionic-Vue library, requiring little to no extra effort while cutting download times significantly.</p><p>The <a href="https://github.com/ModusCreateOrg/beep">current version</a> of BEEP is a full-featured mobile application that showcases a complete solution using Ionic in Vue. We firmly believe that every complete solution or a product requires beautiful custom styling, so we made sure BEEP delivers that too.</p><h3>Ionic 4 Theming Powered by CSS Variables</h3><p>If you even scratched the surface with the shiny new Ionic 4, you’ll immediately notice that one of the driving architectural ideas was to eliminate build steps. This also means that Ionic makes use of some of the most powerful features of modern browsers. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables">CSS custom properties</a> (aka CSS variables) is undoubtedly one of the most exciting new features that Ionic banks on heavily.</p><p>Developers can <strong>theme Ionic components easier than ever</strong>. There are no preprocessors like Sass to work with — it’s all in plain CSS which speeds up build times and lowers the number of dependencies. In fact, you can change things up on the fly with your browser’s DevTools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kNG9ikEIT0hULR9L" /><figcaption><em>Modifying built-in Ionic styles is made easy and elegant with CSS variables</em></figcaption></figure><p>Ionic automatically detects device environment and flags the HTML document with OS type such as Android (md) or iOS (ios). This simplifies device-specific theming for web deployments and native builds. Speaking of native builds, BEEP works remarkably well in native environments with the help of Capacitor.</p><h3>Native Mobile Builds with Capacitor</h3><p><a href="https://capacitor.ionicframework.com/">Capacitor</a> is a Cordova-compatible native wrapper for web applications. We fell in love with the simplicity and the level of control it provides over native shells for BEEP.</p><p>Capacitor provides our web app access to native SDKs, which we used for cool features such as dynamic styling of the native status bar on Android and iOS. BEEP also ties into native events for a finer control of Android hardware buttons.</p><p>Backward compatibility with Cordova was an important factor, given that the Cordova community is so rich with useful plugins. BEEP uses that feature to prompt satisfied users for an app store review.</p><p>The Capacitor-generated native code was easy to integrate with Fastlane for simplified manual or CI automated deployments to application stores and testing services such as HockeyApp.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XCshcgGWl9KQl3DZ" /><figcaption><em>Capacitor makes BEEP look like a native app</em></figcaption></figure><p>Native users expect rich user interfaces supported with beautiful transitions and animations. Ionic UI components already come with gorgeous transitions which we counted on, but also extended from.</p><h3>Transitions and Animations Ionic 4 + Lottie</h3><p>Ionic 4 bundles beautiful platform-specific transitions. However, most views depend on routing and so do transitions.</p><p>Ionic-Vue wraps Vue Router with Ionic Router Outlet, which gives Ionic components direct access to routing information. In return, Ionic provided with the eye-pleasing transitions.</p><p>Transition capabilities go beyond the built-in features, supporting third-party or custom transitions. BEEP puts that flexibility to the test in the final result view where we alternate transitions for navigating back.</p><blockquote><em>One of our users reported that no other hybrid app looks and feels so native.</em></blockquote><p>As if that wasn’t enough for a fantastic User Experience, our designers came up with a beautiful BEEP animation that we presented with some help from <a href="https://airbnb.design/lottie/">Lottie</a>. You can see that in action with the Bee mascot moving on confirmation screens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/230/0*zJpDw5uFe7GKWZD_" /><figcaption><em>Lottie animation exported from Adobe After Effects</em></figcaption></figure><p>Experimenting with transitions helped capture edge cases in using Ionic with Vue.js, but it also helped us contribute to the global community.</p><h3>Giving Back to the Open Source</h3><p>As a reference application, BEEP shows how Ionic 4 apps can be used in Vue, combined with routing capabilities, theming, transitions, third-party API calls, and native integration. This application serves an even greater cause, which is helping the open source community use better software, easier.</p><p>As a product of BEEP, Modus Labs created the <a href="https://github.com/ModusCreateOrg/ionic-vue">Ionic-Vue</a> library that helps the community use Ionic in their Vue apps immediately. We were also able to push a number of fixes to several of the technologies mentioned above, which makes us very proud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8fDj2q2g8ykXFqWu" /><figcaption>Modus’ Michael Tintiuc demoing the integration for Ionic’s Mike Hartington and Manu Almeida</figcaption></figure><p>If we succeeded in inspiring you to give Ionic and Vue a shot, feel free to try out <a href="https://github.com/ModusCreateOrg/beep">BEEP</a> and take a peek into the source code. Don’t forget to let us know how it went.</p><p><em>Originally published at </em><a href="https://moduscreate.com/blog/using-ionic-4-in-vue-applications-with-beep/?utm_source=Medium"><em>moduscreate.com</em></a><em> on October 5, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d66f0851d419" width="1" height="1" alt=""><hr><p><a href="https://medium.com/modus-create-front-end-development/using-ionic-4-in-vue-applications-with-beep-d66f0851d419">Using Ionic 4 in Vue applications with BEEP</a> was originally published in <a href="https://medium.com/modus-create-front-end-development">Modus Create: Front End Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Better Ionic Apps with Ionic Pro, Part 4]]></title>
            <link>https://medium.com/modus-create-front-end-development/building-better-ionic-apps-with-ionic-pro-part-4-3efccf7a0089?source=rss----672b4ec5a5c7---4</link>
            <guid isPermaLink="false">https://medium.com/p/3efccf7a0089</guid>
            <category><![CDATA[hybrid-app-development]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[ionic-framework]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[ionic]]></category>
            <dc:creator><![CDATA[Muhammad Ahsan Ayaz]]></dc:creator>
            <pubDate>Tue, 14 Aug 2018 15:30:02 GMT</pubDate>
            <atom:updated>2018-08-14T15:30:02.029Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*odzezYSR8_Sib00VzVGRTA.jpeg" /></figure><pre><a href="https://medium.com/modus-create-front-end-development/building-amazing-hybrid-apps-with-ionic-pro-b4866fdd9d72">Part1: Ionic Creator</a><br><a href="https://medium.com/modus-create-front-end-development/building-amazing-ionic-apps-with-ionic-pro-part-2-a1878a34e663">Part2: Ionic DevApp</a><br><a href="https://medium.com/modus-create-front-end-development/building-better-ionic-apps-with-ionic-pro-part-3-c771b96be8b9">Part3: Ionic Monitor</a><br><a href="https://medium.com/@ahsan.ayaz/building-better-ionic-apps-with-ionic-pro-part-4-3efccf7a0089">Part4: Ionic Deploy</a></pre><p>In our <a href="https://medium.com/@ahsan.ayaz/building-better-ionic-apps-with-ionic-pro-part-3-c771b96be8b9">previous post</a>, we set up Ionic Monitor to catch runtime errors and fix them before they become a disaster for end users. In Part 4 of our Ionic Pro series, we will go through the Ionic Deploy service.</p><p><a href="https://ionicframework.com/docs/pro/deploy/">Ionic Deploy</a> allows us to publish changes and hot updates to our Ionic 3 applications without needing to recompile the app and resubmit to app stores. This is very useful for publishing bug fixes, minor business logic changes and UI/UX updates to apps. As discussed earlier in the series, this makes a really good combo with the Ionic Monitor service so that errors/bugs are resolved, and fixes are shipped to users quickly. One interesting and powerful use of Ionic Deploy is A/B testing. If required, we can create different channels for testing with several variations to the app/code.</p><p>It is important to know that when using Ionic Deploy, the only changes that can be pushed <em>immediately</em> are changes to the view (HTML), business logic (Javascript), assets (such as images in the www folder) and styling (CSS). It excludes any changes to the native binary, such as the native plugins (Cordova Plugins), config.xml or native images (icons, splash screens, etc). For these changes, the app has to be recompiled and must go through the app stores to be updated for the end users.</p><h3>How it works</h3><p>Ionic Deploy works with <a href="https://ionicframework.com/docs/pro/basics/git/">Git Flow</a> to push updates in production, or for testing applications via different channels created in <a href="https://dashboard.ionicjs.com/">Ionic Dashboard</a>. Channels are useful when you have to push different versions of the app to different groups.</p><p>By default, Ionic creates two Channels for every app linked to Ionic Pro:</p><ol><li><strong>Master channel</strong> is used to test pre-production builds.</li><li><strong>Production channel</strong> is used for the production builds to update the app for the end users.</li></ol><h3>Set up Deploy</h3><p>To set up Ionic Deploy, go to the Ionic Dashboard, select notes-app and go to the <em>Code</em> section:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3RJ0LnuTAvZhERxF3eYu9w.png" /></figure><p>Then go to the <em>Channels</em> tab and select <em>Set Up Deploy</em> for the <em>Production</em> channel:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EI1kkUJ6MHRZ0Ll1sUvgzw.png" /><figcaption><em>Choosing a channel to set up deploy</em></figcaption></figure><p>Notice that in the channel mentions there is <em>no active commit</em> on the channel yet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hTlUYVOoLEdFXu3m8D3_EA.png" /><figcaption><em>Choosing an appropriate update method</em></figcaption></figure><p>The image above shows that we can select one of the three options provided:</p><ol><li><strong>Download updates in background, install next time app loads.</strong> If we use this option, when we push an update, the next time the user opens the app, it will identify that there is an update available. The plugin will download the update in the background and will apply the update the next time the user opens the app again.</li><li><strong>Download updates in splashscreen and install immediately.</strong> Using this option, when we push an update, the app will start downloading the update as soon as the user opens the app (while displaying the splashscreen). The update is immediately applied and the user will see the updated version.</li><li><strong>I’ll manually perform updates in JavaScript.</strong> This option is well suited for more control over the updates on special business cases. The developers can write their own logic on how and when to apply the update.</li></ol><p>The next step is to open terminal, navigate into the app’s root folder, and copy the command as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*prg3REkPwkgZaVBYwvYxAQ.png" /><figcaption><em>Copying the Ionic plugin code</em></figcaption></figure><p>Now execute the copied command:</p><pre>cordova plugin add cordova-plugin-ionic --save \<br>--variable APP_ID=&quot;bafeb0a1&quot; \<br>--variable CHANNEL_NAME=&quot;Production&quot; \<br>--variable UPDATE_METHOD=&quot;auto&quot;</pre><p>When working on your own application, substitute your APP_ID and CHANNEL_NAME above and execute the command using terminal. Notice that we have some changes in the repository now, including package.json and config.xml as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mgl7b46oMsSTTGD3BNk8CA.png" /><figcaption><em>Cordova plugin added to config.xml</em></figcaption></figure><p>The important thing to notice is that we have the APP_ID, CHANNEL_NAME and UPDATE_METHOD added with the cordova-plugin-ionic entry in config.xml. The Ionic plugin communicates with the Ionic Deploy service using the values from this entry in config.xml. If we choose the manual method in the update (i.e. if the value of UPDATE_METHOD is set to none), we would have to deal with the update mechanism in our code (we won’t be covering the manual method in this post).</p><p>The next step is to configure Ionic Pro for automated deployments. To do that, go back to the channels page, click on <em>Production</em>channel, click <em>Settings</em>, enter production as the branch, and hit <em>Save Channel</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vfXrnN4xgJrt31uaZmqI9w.png" /></figure><p>The next step is to push these changes to Ionic Pro. First, commit and push the changes in the master branch. Then, create a branch named production. This branch will deploy the changes when we run git push ionic production.</p><p>Commit and push the changes in master, then create the production branch:</p><pre>git checkout -b production</pre><p>Now, push the code to the production branch:</p><pre>git push ionic production</pre><p>After pushing the code to Ionic, the terminal will display the information below which explains that the new build has been triggered:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sSP7WpvdG3XFQS_lFgxqkg.png" /></figure><p>In the Ionic Dashboard, we can now see the new deployment:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EqEc_QSenRwtkBYLtAmhWg.png" /></figure><h3>Testing Deployments</h3><p>To test that the deployments work in real time, we are going to change the <em>Add Note</em> button on the home page to an ion-fabbutton. Quick recap: here’s what the current home page looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/0*p_wTTl-z5rtfmWUk.png" /></figure><p>Below is the code that we have for the <em>Add Notes</em> button in the current app:</p><pre>&lt;button id=&quot;home-button1&quot; ion-button clear color=&quot;positive&quot; block&gt;<br>  Add Note<br>&lt;/button&gt;</pre><p>We will replace the button with an ion-fab button:</p><pre>&lt;ion-fab top right edge&gt;<br> &lt;button ion-fab mini&gt;&lt;ion-icon name=&quot;add&quot;&gt;&lt;/ion-icon&gt;&lt;/button&gt;<br>&lt;/ion-fab&gt;</pre><p>After making the changes, commit and push to master. Then, checkout production:</p><pre>git checkout production</pre><p>Now, merge the changes from master into production:</p><pre>git merge master</pre><p>We are now ready to push the changes to Ionic Pro. Execute the command:</p><pre>git push ionic production</pre><p>Our app is currently running on an Android device as shown above. First push the changes to Ionic and then restart the app to see the changes automatically without recompiling the app for the device. The device should automatically get the updated changes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*ASVy6qEAksbCP8Aa.png" /></figure><p>We can also see in the Ionic Dashboard that our <em>Production</em> channel now has the build with the changes pushed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GyREP57GdS-Pl-CQUCAB-Q.png" /></figure><p>There are some cases when a build is accidentally pushed with vulnerabilities or errors, and we really want to jump back to the previous stable build so we can fix the issues. Luckily, Ionic provides a way to easily roll back the changes. Click on a channel and roll back to one of the previous builds, if necessary:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*68hRK5CB4O-rK1XkesBB2g.png" /></figure><h3>Conclusion</h3><p>Ionic Deploy is a really powerful tool and highly recommended for hot updates and managing channels for deployments. For a product owner or developer who is responsible for deployments, Ionic Deploy makes it really easy to manage the deployments, create auto-deployment mechanisms, provide hot updates or hot fixes, and roll back to a previous stable build if required.</p><p>This is the last part of our Ionic Pro series. You can access the app built during the series <a href="https://github.com/AhsanAyaz/notes-app-ionic-pro">here</a>.</p><p><em>Sharing is caring! Please hit that 👏 and share this article with anyone who might benefit from it. For more like this, follow </em><a href="https://medium.com/modus-create-front-end-development"><em>Modus Create: Front End Development</em></a><em> and </em><a href="https://moduscreate.com/category/ionic/">Ionic</a>, <em>or find me on </em><a href="https://twitter.com/ahsan_ayz"><em>Twitter</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3efccf7a0089" width="1" height="1" alt=""><hr><p><a href="https://medium.com/modus-create-front-end-development/building-better-ionic-apps-with-ionic-pro-part-4-3efccf7a0089">Building Better Ionic Apps with Ionic Pro, Part 4</a> was originally published in <a href="https://medium.com/modus-create-front-end-development">Modus Create: Front End Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Measuring your React app performance]]></title>
            <link>https://medium.com/modus-create-front-end-development/measuring-your-react-app-performance-d44a12504946?source=rss----672b4ec5a5c7---4</link>
            <guid isPermaLink="false">https://medium.com/p/d44a12504946</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[chrome-developer-tools]]></category>
            <category><![CDATA[chrome-timeline]]></category>
            <category><![CDATA[timeline]]></category>
            <category><![CDATA[chrome]]></category>
            <dc:creator><![CDATA[Matías Hernández]]></dc:creator>
            <pubDate>Wed, 25 Jul 2018 15:26:02 GMT</pubDate>
            <atom:updated>2018-07-25T15:26:01.805Z</atom:updated>
            <content:encoded><![CDATA[<p>There are different ways or approaches that helps you to measure your app performance when working with React. Here we will summarize a two of them:</p><ul><li>Using Chrome Timeline to Profile Components</li><li>The new unstable Profiler component.</li></ul><h3>Using Chrome Timeline to Profile your Components</h3><p>This is the more direct way and less “invasive” method to measure your app performance.</p><p>You can use Chrome Developer Tools to visualize the components in the Chrome Timeline. Using this you can see the components that are mounted, updated and unmounted and the time used in each task.</p><p>To use this tool just load your app adding a new query string to the url ?react_perf once the app is loaded:</p><ul><li>Open the Timeline tab and press <strong>Record</strong></li><li>Use your app while Chrome is recording</li><li>Stop the recording</li></ul><p>Now you can analyze the results that were recorded, this data can help you figure out when some piece of the UI get’s updated when it shouldn’t, how much updates happens, etc.</p><h3>Profile component</h3><p>The core React team recently merge a new PR including a new component type: Profiler</p><p>This component can be used to get the following timing metrics:</p><ul><li>User Timing API: Measure the start and stop time for each component lifecycle</li><li>Render time: The actual time spent rendering the Profile and it descendants</li><li>Base render time: The time spent in the most recent `render` for each component under the Profiler tree.</li></ul><h4>How to use Profiler :</h4><p>First: This component is a new experimental API so it’s currently exported as React.unstable_Profiler and its available in the master branch of react. <a href="https://github.com/facebook/react/blob/master/packages/react/src/React.js#L57">https://github.com/facebook/react/blob/master/packages/react/src/React.js#L57</a></p><p>Using this component is dead simple:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d08bd4084c6515c7a68bffd608c026f5/href">https://medium.com/media/d08bd4084c6515c7a68bffd608c026f5/href</a></iframe><p>This component acts just as a “container” so the Profiler can be declared anywhere in your tree and can be nested.</p><p>The onRender callback is called on each `render` of the root with the following arguments:</p><ul><li>id: An identificator for the Profiler</li><li>phase: Identify in what step the component is: mount or update</li><li>actualTime: The time spent rendering the Profiler and the descendant tree.</li><li>baseTime: The time spent rendering the descendant components of the Profiler</li></ul><h4>Metrics</h4><p>The metrics that can be gathered with this component are (as mentioned above)</p><ul><li>User Timing API: Measure the start and stop time for the components lifecycle. This is measured in a realtime graph gathering the times for each component lifecyle in the tree. The realtime graph is recorded after each lifecyle call.</li><li>Actual Render time: The actual time spent rendering the Profile and it descendants. This is measured but starting a timer during the <em>begin</em><strong><em> </em></strong>phase and finishing it at the <em>complete</em> phase. The time is recorded each time Profiler is re-rendered. Can be useful to understand how the subtree make use of `shouldComponentUpdate` and to check how the momoization process behave. Less time means better memoization.</li><li>Base render time: The time spent in the most recent `render` for each component under the Profiler tree. This is measured for each fiber under the Profiler component. The times are not updated is the components skips the render. This can tell how expensive is the `render` function in the worst scenario.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d44a12504946" width="1" height="1" alt=""><hr><p><a href="https://medium.com/modus-create-front-end-development/measuring-your-react-app-performance-d44a12504946">Measuring your React app performance</a> was originally published in <a href="https://medium.com/modus-create-front-end-development">Modus Create: Front End Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Load your graphql documents with webpack (Apollo)]]></title>
            <link>https://medium.com/modus-create-front-end-development/load-your-graphql-documents-with-webpack-apollo-c1e166404cba?source=rss----672b4ec5a5c7---4</link>
            <guid isPermaLink="false">https://medium.com/p/c1e166404cba</guid>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[apollo-client]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[colocation]]></category>
            <dc:creator><![CDATA[Matías Hernández]]></dc:creator>
            <pubDate>Wed, 18 Jul 2018 15:21:01 GMT</pubDate>
            <atom:updated>2018-07-18T15:21:00.902Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>You can write queries and mutations in a .graphql file and directly import that into your JS code</blockquote><p>One of the first things that people comment when talking about work with Graphql is about the <strong>colocation </strong>of the queries and the view component but sometimes this is more a problem than an advantage, for example, you need to reuse some query in multiple files, components or even packages, you are missing some editor highlighting or tooling support that can look the static file (static analysis). You cand read more about some of the benefits of static GraphQL queries in this <a href="https://dev-blog.apollodata.com/5-benefits-of-static-graphql-queries-b7fa90b0b69a">blog post from the apollo folks</a></p><p>Well, <a href="https://github.com/apollostack/graphql-tag">graphql-tag</a> give us some options to improve this situation, one is using the <a href="https://github.com/gajus/babel-plugin-graphql-tag">babel-plugin-graphql-tag</a> that will help compiling the graphql tagged templates at build time. So you basically can write your queries inside a JS file and export as strings (tagged with the `gql` function) and then babel will take care of compile at build time and remove the `graphql-tag` dependency.</p><p>Other option is use the webpack loader provided with the package.</p><p>The webpack loader allows you to import queries/mutations from a single `. graphql` file (including import/export fragment definitions). This makes easy to store your GraphQL documents in a different “repository” than your view components, share fragments across the documents and fully support static analysis tools and editor features.</p><h3>Using graphql webpack loader</h3><p>To enable this features you just need to update your webpack configuration to add the corresponding loader like</p><blockquote>Currently most of the apps written with Apollo Client are using the `gql` function to place the document inside JS template literals</blockquote><pre>module.exports = {<br>    module: {<br>        rules: [<br>           {<br>              test: /\.(graphql|gql)$/,<br>              loader: &#39;graphql-tag/loader&#39;,<br>              exclude: /node_modules/,<br>           }<br>        ]<br>    }<br>}</pre><p>Then you just need to start moving your queries/mutation to a graphql document like:</p><pre>query LoadAllComents($postId: String!) {<br>    id<br>    author<br>    content<br>    data<br>}</pre><p>and then just import the query as any other js file</p><pre>import LoadAllComments from &#39;./graphql/CommentsQueries.graphql&#39;</pre><p>Here, webpack will take care of load the `.graphql` file, parse it with the GraphQL parser and create the corresponding document.</p><p>You can also add multiple operations inside one `.graphql` file and imported them as named modules</p><pre>import { LoadAllComments, OtherQuery } from &#39;./graphql/CommentsQueries.graphql&#39;</pre><p>And finally, you can also use fragments to split and reuse your code inside the queries. You just need to use the `#import` preprocessor provided by the loader.</p><p>First write the file that will contain the fragments</p><pre>fragment CommentsFragment on Comment {<br>    id<br>    author<br>    createAt<br>    content<br>}</pre><p>And then just import that into the graphql document.</p><pre>#import &quot;./fragments/CommentsFragments.graphql&quot;</pre><pre>query Comments($postId: String!) {<br>    ...CommentsFragment<br>}</pre><p><strong>Other options</strong></p><p>There is an option for those projects than don’t use webpack but still want to be able to import grapqhl documents, they can use <a href="https://github.com/detrohutt/babel-plugin-inline-import-graphql-ast">babel-plugin-inline-import-graphql-ast</a></p><p>There is also a package that can be used to for those that can’t use the babel plugin: <a href="https://www.npmjs.com/package/graphql-import">graphql-import</a></p><h3>One step further</h3><p>You can go further with this split and create a isolated package that store the shared graphql documents. This can be quickly done using <a href="https://yarnpkg.com/lang/en/docs/workspaces/">yarn workspaces</a> or <a href="https://lernajs.io">lerna</a> to create a monorepo. (You can read more here: <a href="https://github.com/korfuri/awesome-monorepo">awesome-monorepo</a>, <a href="https://github.com/babel/babel/blob/master/doc/design/monorepo.md">Why Babel is a monorepo</a>, <a href="https://gomonorepo.org">Go MonoRepo</a>, <a href="https://ai.google/research/pubs/pub45424">Why Google use a monorepo?</a> )</p><p>Just create a new package into your monorepo to store all the .graphql files, call it something like `@org/graphql`</p><p>Set the main entry of this package to src/index.js and inside this javascript file, just import/export the queries like:</p><pre>export { AllComentsQuery, NewCommentMutation, UpdateCommentMutation } from &#39;./comments.graphql&#39;</pre><p>Now in your other packages, just add the new graphql package to the dependencies and then in the core just run</p><pre>import { AllComentsQuery } from &#39;@org/graphql&#39;</pre><p>All set!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1e166404cba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/modus-create-front-end-development/load-your-graphql-documents-with-webpack-apollo-c1e166404cba">Load your graphql documents with webpack (Apollo)</a> was originally published in <a href="https://medium.com/modus-create-front-end-development">Modus Create: Front End Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VIM TIPS #3: FuzzyFind and replace]]></title>
            <link>https://medium.com/modus-create-front-end-development/vim-tips-3-fuzzyfind-and-replace-17e0062856eb?source=rss----672b4ec5a5c7---4</link>
            <guid isPermaLink="false">https://medium.com/p/17e0062856eb</guid>
            <category><![CDATA[vim-7]]></category>
            <category><![CDATA[vim]]></category>
            <category><![CDATA[vimgrep]]></category>
            <category><![CDATA[fuzzyfind]]></category>
            <dc:creator><![CDATA[Matías Hernández]]></dc:creator>
            <pubDate>Wed, 11 Jul 2018 15:21:01 GMT</pubDate>
            <atom:updated>2018-07-11T15:21:01.066Z</atom:updated>
            <content:encoded><![CDATA[<p>This is just another vim tip that can help you in some cases.<br>The use case is simple, in your project you have a bunch of file that need to be updated to change just one word or pattern, for example: Update the name of some package that is imported in a lot of files.</p><p>Is clear that you have two options:</p><ol><li>Open each file and change the content of it with the corresponding string or</li><li>Search and replace: Search all the files that have that string pattern, and update that string with the correct one in a few steps.</li></ol><p>Obviously, we don’t want to spend our time editing file by file, so the option 2 is the one that everyone would choose. <br>Now, most of the fancy code editors have some option in the menu that allow you to do this, and vim is not less.</p><h3>How to fuzzy find and replace in vim?</h3><p>In my case I have <a href="https://github.com/junegunn/fzf.vim">fzf</a> installed but you can also do it with just <a href="https://github.com/rking/ag.vim">Ag</a> or without any plugin with just `<a href="http://vim.wikia.com/wiki/Find_in_files_within_Vim">vimgrep</a>`</p><p>The whole idea here is run a search for the pattern, this will open the quickfix list, select the items you want and then run a command on the quickfix list to do the replace, like:</p><p>First find the files</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qIpbllpcpBu8VfwwkEv8IA.png" /><figcaption>This is using Find from fzf</figcaption></figure><p>Then , alt-a to select the items (if you are using iTerm2 in macOS you need to update the <a href="https://github.com/junegunn/fzf.vim/issues/54#issuecomment-350417085">Esc+ config</a>), and enter to populate the quickfix list with the items selected.</p><p>Now, run the command like</p><p>:cfdo %s/food/bar/g | :w</p><p>cfdo is a new command available from Vim 7.4+ that allows to run commands over items in the quickfix list natively. (<a href="https://robots.thoughtbot.com/lists-vim-and-you">More info about </a><a href="https://robots.thoughtbot.com/lists-vim-and-you">cfdo</a> )</p><p>And voila!. The pattern was updated to the one you need in all the files.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17e0062856eb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/modus-create-front-end-development/vim-tips-3-fuzzyfind-and-replace-17e0062856eb">VIM TIPS #3: FuzzyFind and replace</a> was originally published in <a href="https://medium.com/modus-create-front-end-development">Modus Create: Front End Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upgrading an Ionic 3 application to Ionic 4]]></title>
            <link>https://medium.com/modus-create-front-end-development/upgrading-an-ionic-3-application-to-ionic-4-eaf81a53cdea?source=rss----672b4ec5a5c7---4</link>
            <guid isPermaLink="false">https://medium.com/p/eaf81a53cdea</guid>
            <category><![CDATA[ionic4]]></category>
            <category><![CDATA[angularjs]]></category>
            <category><![CDATA[stencil]]></category>
            <category><![CDATA[stenciljs]]></category>
            <category><![CDATA[ionic]]></category>
            <dc:creator><![CDATA[Muhammad Ahsan Ayaz]]></dc:creator>
            <pubDate>Thu, 21 Jun 2018 16:01:02 GMT</pubDate>
            <atom:updated>2018-06-21T16:01:02.015Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kn5nvOq3DJi8PG-YZxPbdQ.jpeg" /></figure><p>Ionic is one of the coolest frameworks out there for developing hybrid mobile apps and Progressive Web Applications (PWAs). As an Ionic partner, we have been following Ionic’s development closely and are very excited about the upcoming major release of the framework, Ionic 4. One of the main reasons is Ionic v4 is based on <a href="https://blog.ionicframework.com/the-end-of-framework-churn/">Stencil</a>, which generates standard Web Components already supported in most major browsers today. For non-supported browsers, there’s a really small and robust polyfill that makes the usage of <a href="https://www.webcomponents.org/introduction">Web Components</a> seamless. If you want to know more about Stencil, read our <a href="https://moduscreate.com/blog/building-web-components-stencil/">previous post</a>.<br>Ionic v4 is a ground-up rewrite with a focus on being independent of any particular framework. Ionic v4 apps can be bootstrapped with Angular and support for other frameworks like React is planned.<br>Thankfully, migration from Ionic v3 to v4 is fairly straightforward and nothing like the painful upgrade from v1 to v2. In this article, we’ll show you how we can migrate an Ionic v3 app to v4. The code is already up on <a href="https://github.com/ModusCreateOrg/ion-meetups">https://github.com/ModusCreateOrg/ion-meetups</a>.</p><h3>Setting up Ionic 4 project and moving our code</h3><p>First off, install the latest version of Ionic and Cordova:</p><pre>npm install -g ionic@rc cordova<br>// OR<br>yarn add --global ionic@rc cordova</pre><p>Next, initialize a new Ionic 4 project</p><pre>ionic start ion-meetups tabs --type=angular</pre><p>Initialising a new project is the recommended way of migrating projects from v3 to v4. That way, we get all the supporting files, directory structure and a package.json compatible with v4 out-of-box. Notice the --type=angular? It specifies that our Ionic project will be based on Angular. Going forward, this flag will allow bootstrapping projects using other frameworks like React, Vue or vanilla Javascript with Ionic. However, at the time of writing this blog post, only Angular is supported with the --type flag.<br>Looking at the directory structure of projects, we note our first change from v3. All the pages, providers, etc. have moved to /src/app. This is in sync with how ng-cli bootstraps new projects. Keeping with convention, we move our code as follows:</p><pre>/src/pages -&gt; /src/app/pages<br>/src/models -&gt; /src/app/models<br>/src/providers -&gt; /src/app/providers</pre><p>This pattern applies for any other custom directories or files we may have directly under /src in v3. All of them become citizens of /src/app in v4. In the following image, the directory structures are for v3 on the left and v4 on the right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/0*0KFbTbxKsWOYzeL1.jpg" /></figure><h3>Including third party modules</h3><p>If your v3 application depends upon third-party modules like moment etc., make sure to install them in the v4 project too.</p><h3>Updating our imports</h3><p>We need to replace ionic-angular with @ionic/angular across the project.<br>@IonicPage isn’t valid in v4. We can remove it from our project – both from the imports and the decorator from our pages.<br>We also replace any imports in NgModule like IonicPageModule.forRoot(...) or similar with a simple IonicModule. With v4, Ionic has moved to using a platform specific router instead of the NavController. Since we’re building an Angular project, we’re going to use the <a href="https://angular.io/api/router/Router">Angular Router</a>. Updates to routing are possibly the biggest change in v4, so let’s talk about that next.</p><h3>Changes to routing</h3><p>Ionic v4 is the biggest update to the framework yet. It makes Ionic framework agnostic — we can use it with any framework out there, or with vanilla Javascript, if we so wish.<br>Beginning with Ionic v4, it is recommended to use the router provided by the underlying framework; and in our case, Angular.<br>Migrating our applications from Ionic router to Angular router is a large change in v4, and we’ve compiled a list of things that have changed with routing to make the switch easier.<br>In Ionic v3, we set up routes using IonicPageModule. In v4, we follow the familiar “angular way” of setting routes. Here’s a sample routing module for the tabs page, with a single child route being lazy loaded.</p><pre>import { NgModule } from &#39;@angular/core&#39;;<br>import { NgModule } from &#39;@angular/core&#39;;<br>import { Routes, RouterModule } from &#39;@angular/router&#39;;<br>import { TabsPage } from &#39;./tabs.page&#39;;<br>const routes: Routes = [<br>  {<br>    path: &#39;tabs&#39;,<br>    component: TabsPage,<br>    children: [<br>      {<br>        path: &#39;about&#39;,<br>        outlet: &#39;about&#39;,<br>        loadChildren: &#39;../about/about.module#AboutModule&#39;<br>      }<br>    ]<br>  },<br>  { path: &#39;&#39;, redirectTo: &#39;/tabs/(about:about)&#39;, pathMatch: &#39;full&#39; }<br>];<br>@NgModule({<br>  imports: [RouterModule.forChild(routes)],<br>  exports: [RouterModule]<br>})<br>export class TabsRoutingModule { }</pre><p>Further, here’s the about.module.ts, which is being lazily loaded into this tab route.</p><pre>import { NgModule } from &#39;@angular/core&#39;;<br>import { NgModule } from &#39;@angular/core&#39;;<br>import { RouterModule, Route } from &#39;@angular/router&#39;;<br>import { IonicModule } from &#39;@ionic/angular&#39;;<br>import { AboutPage } from &#39;./about.page&#39;;<br>const routes: Array = [<br>  {<br>    path: &#39;&#39;,<br>    component: AboutPage,<br>    outlet: &#39;about&#39;<br>  }<br>];<br>@NgModule({<br>  declarations: [AboutPage],<br>  entryComponents: [AboutPage],<br>  imports: [IonicModule, RouterModule.forChild(routes)]<br>})<br>export class AboutModule { }</pre><p>If you’ve not seen the outlet route property before, it enables secondary routing. It’s useful when you have more than one routing outlet on a page, and want to control which components/pages go into which outlet. To find out more about secondary routes, visit official <a href="https://angular.io/guide/router">Angular docs</a>.<br>With the routes setup, we need to update the code around navigation and params in our components. We use <a href="https://angular.io/api/router/Router">Router</a> instead of <a href="https://ionicframework.com/docs/api/navigation/NavController/">NavController</a> for routing, and <a href="https://angular.io/api/router/ActivatedRoute">ActivatedRoute</a> instead of <a href="https://ionicframework.com/docs/api/navigation/NavParams/">NavParams</a> to fetch navigation params (data passed during navigation in v4). Both are imported from @angular/router.<br>Following is how we navigated in v3:</p><pre>this.navCtrl.push(&#39;user-detail-page&#39;, {userEmail: user.email});</pre><p>This gets updated in v4 as:</p><pre>this.router.navigateByUrl(`tabs/(users:user-detail/${user.email}`);</pre><p>There’s more than one way to navigate in v4, all thanks to the Angular router. We can find out more about routing in Angular’s official routing docs.<br>To access params, we use Angular’s ActivatedRoute provider as follows:</p><pre>constructor(<br>  private route: ActivatedRoute<br>) {<br>  this.route.params.pipe(first()).subscribe(params =&gt; {<br>    // access individual parameters as params.id or params.email<br>  });<br>}</pre><p>Lastly, let’s look at how we set up router outlets in our templates, where we want our routes to load. Here’s what a tab component looks like in v3:</p><pre>&lt;ion-tabs&gt;<br>  &lt;ion-tab [root]=&quot;tab3Root&quot; tabTitle=&quot;About&quot; tabIcon=&quot;information-circle&quot;&gt;&lt;/ion-tab&gt;<br>&lt;/ion-tabs&gt;</pre><p>Here’s what an equivalent v4 tab component template will look like:</p><pre>&lt;ion-tabs&gt;<br>  &lt;ion-tab label=&quot;About&quot; icon=&quot;information-circle&quot; href=&quot;/tabs/(about:about)&quot;&gt;<br>    &lt;ion-router-outlet name=&quot;about&quot;&gt;&lt;/ion-router-outlet&gt;<br>  &lt;/ion-tab&gt;<br>&lt;/ion-tabs&gt;</pre><p>Notice how ion-tab is just a wrapper around the actual ion-router-outlet. Unlike in v3, ion-tab itself isn’t responsible for any routing here.<br>With that, we’ve covered the 3 aspects of routing in v4 – setting routes up in module and navigating using component logic and template. Obviously, the entire Angular router API is available to us for use in Ionic now.<br>Note: If you have an Ionic v3 web app, you may want to preserve compatibility with the old URLs; i.e. for existing shared links and existing users having bookmarks etc. We wrote a <a href="https://github.com/ModusCreateOrg/ion-meetups/blob/master/src/app/services/routes-fallback.service.ts">RoutesFallbackService</a> to handle the old URLs compatibility. Feel free to use the code snippet.</p><h3>Changes to styles encapsulation</h3><p>In v3, all of the page styles were encapsulated in the styles files under the page element tag. For instance, for AboutPage, we had something like this in the about.scss file:</p><pre>page-about {<br>  .about-page {<br>    &amp;__contributors {<br>      .details {<br>        margin-left: 10px;<br>      }<br>    }<br>  }<br>}</pre><p>Ionic v3 did magic behind the scenes for keeping the styles encapsulated. However, this does not work in v4 because of Angular’s own view encapsulation methods. So you cannot style the about-page element within the about.scss file.<br>If you did not have any styles for the Host Element in v3, you could remove the about-pageselector for v4. But if you did have some styles earlier, you can use the :host selector as below in v4 styles:</p><pre>:host {<br>  .about-page {<br>    &amp;__contributors {<br>      .details {<br>        margin-left: 10px;<br>      }<br>    }<br>  }<br>}</pre><p>You can read more about Angular component styles in the <a href="https://angular.io/guide/component-styles">Angular docs</a>.</p><h3>Changes to providers / services</h3><p>In v3, when we created a provider, it would go in the providers folder and the provider was added to the app.module.ts file. In v4, when you create a service for Angular, you do it using the ng g service command. In v3, the services were provided into app.module.ts. In v4, the services contain some metadata information in the @Injectable decorator introduced in Angular v6, as below:</p><pre>@Injectable({<br>  providedIn: &#39;root&#39;<br>})<br>export class MyService {<br>}</pre><h3>What else changed?</h3><p>There are also a few relatively minor changes to various Ionic entities — attributes for components, methods etc. It is recommended to consult the official Ionic docs whenever you run into problems with the API. Let’s review all the updates we did for our v4 upgrade of the ion-meetups app.<br>[tabIcon] and [tabTitle] attributes for element are now [icon] and [label], respectively. Instead of providing a [root] input with a component or locator string, we now set [href] to the URL of the tab’s root component directly. Example:</p><pre>&lt;ion-tab label=&quot;About&quot; icon=&quot;information-circle&quot; href=&quot;/tabs/(about:about)&quot;&gt;<br>&lt;/ion-tab&gt;</pre><p>Navbar isn’t a thing in v4. We can use the more general toolbar to do everything done with a navbar. For most apps, this change is as small as updating the HTML tags from to . Here’s a more full-fledged example from our app:</p><pre>&lt;ion-toolbar color=&quot;primary&quot;&gt;<br>  &lt;ion-buttons slot=&quot;start&quot;&gt;<br>  &lt;ion-back-button text=&quot;Events&quot; defaultHref=&quot;/tabs/(events:event-list)&quot;&gt;<br>  &lt;/ion-back-button&gt;<br>  &lt;/ion-buttons&gt;<br>  &lt;ion-title&gt;{{($eventItem | async)?.name}}&lt;/ion-title&gt;<br>&lt;/ion-toolbar&gt;</pre><p>Across the board, positioning directives such as item-start, start, item-end and end are now replaced with more consistent slot=&quot;start&quot; or slot=&quot;end&quot;. Example:</p><pre>&lt;ion-avatar slot=&quot;start&quot;&gt;<br>  &lt;img [src]=&quot;user.picture.thumbnail&quot;&gt;<br>&lt;/ion-avatar&gt;</pre><p>Positioning directives such as right, bottom etc. have been brought together into a more general API. Example:</p><pre>&lt;ion-fab vertical=&quot;bottom&quot; horizontal=&quot;end&quot;&gt;<br>  &lt;ion-fab-button (click)=&quot;createEvent()&quot;&gt;<br>    &lt;ion-icon name=&quot;create&quot;&gt;&lt;/ion-icon&gt;<br>  &lt;/ion-fab-button&gt;<br>&lt;/ion-fab&gt;</pre><p>These updates focus on making the API consistent no matter which framework you’re using ionic with.</p><h3>Conclusion</h3><p>We think most Ionic 3.x applications can be updated to Ionic 4 with minimal effort. Even for more complex applications, it should be a reasonably straightforward migration path.<br>We’ll be happy to help with any problems you face with migrations to Ionic 4. Use the comments below to tell us your experience upgrading your apps and how you’re liking Ionic 4 so far.</p><p><em>Modus is an official partner of Ionic. To read more about our partnership and the benefits of working with Modus + Ionic, go </em><a href="https://moduscreate.com/partners/ionic/"><em>here</em></a><em>.</em></p><p><em>P.S. Thanks for reading this far! If you found value in this, I’d really appreciate it if you recommend this post (by clicking the 👏 button) so other people can see it!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eaf81a53cdea" width="1" height="1" alt=""><hr><p><a href="https://medium.com/modus-create-front-end-development/upgrading-an-ionic-3-application-to-ionic-4-eaf81a53cdea">Upgrading an Ionic 3 application to Ionic 4</a> was originally published in <a href="https://medium.com/modus-create-front-end-development">Modus Create: Front End Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Better Ionic Apps with Ionic Pro, Part 3]]></title>
            <link>https://medium.com/modus-create-front-end-development/building-better-ionic-apps-with-ionic-pro-part-3-c771b96be8b9?source=rss----672b4ec5a5c7---4</link>
            <guid isPermaLink="false">https://medium.com/p/c771b96be8b9</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[hybrid-app-development]]></category>
            <category><![CDATA[ionic]]></category>
            <dc:creator><![CDATA[Muhammad Ahsan Ayaz]]></dc:creator>
            <pubDate>Tue, 20 Feb 2018 20:58:50 GMT</pubDate>
            <atom:updated>2018-05-23T14:13:55.149Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dUx_tOq9_PgH7MusF1T0zA.jpeg" /></figure><pre><a href="https://medium.com/modus-create-front-end-development/building-amazing-hybrid-apps-with-ionic-pro-b4866fdd9d72">Part1: Ionic Creator</a><br><a href="https://medium.com/modus-create-front-end-development/building-amazing-ionic-apps-with-ionic-pro-part-2-a1878a34e663">Part2: Ionic DevApp</a><br><a href="https://medium.com/modus-create-front-end-development/building-better-ionic-apps-with-ionic-pro-part-3-c771b96be8b9">Part3: Ionic Monitor</a><br><a href="https://medium.com/@ahsan.ayaz/building-better-ionic-apps-with-ionic-pro-part-4-3efccf7a0089">Part4: Ionic Deploy</a></pre><p>In our <a href="https://medium.com/modus-create-front-end-development/building-amazing-ionic-apps-with-ionic-pro-part-2-a1878a34e663">previous post</a>, we demonstrated how to easily run an Ionic app on devices without installing the native SDKs using <a href="https://ionicframework.com/docs/pro/devapp/">Ionic DevApp</a>. For Part 3 in our series, we will use Ionic Monitor to find and fix errors before they are caught by users.</p><h3>Ionic Monitor</h3><p>Ionic Monitor is a great tool as it enables monitoring runtime errors automatically. It is perhaps the <strong>only</strong> solution that provides error tracking to the typescript source files. Compared to other error tracking mechanisms, the most appealing thing about Ionic Monitor is the way it tracks the error from the web layer to the typescript source maps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*m_9D2VxZtM47c_PK9b9x1w.gif" /><figcaption><em>Now what caused it to fail?</em></figcaption></figure><p>Combining Ionic Monitor with Ionic Deploy allows for rolling out hot updates with fixes quickly. In essence, with Ionic Monitor you can:</p><ul><li>Find out the root cause of runtime errors with tracing to the typescript layer.</li><li>Get real time notifications and alerts so you are notified as soon as something goes bad in the app.</li><li>Fix the errors quickly, even in apps already live in app stores.</li></ul><h3>Getting started with Ionic Monitor</h3><p>If you do not have the latest version of the Ionic CLI installed, run the command:</p><pre>npm install -g ionic</pre><p>In terminal, from the project’s root folder, install the Ionic Pro client from NPM:</p><pre>npm install -S @ionic/pro</pre><p>Make sure that you’re running @ionic/app-scripts version 3.1.0 or later, and @ionic/proversion 1.0.12 or later. You can verify the versions in the package.json file.</p><p>To setup and integrate Ionic Monitor in our notes-app , we will create an Ionic Provider named AppErrorHandlerProvider . In terminal, from the project’s root folder, run the command below to create the provider:</p><pre>ionic g provider AppErrorHandler</pre><p>Open the file providers/app-error-handler/app-error-handler.ts and replace the contents with the code below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d477e601d2bb1de0a8b16ef1c8f0d1bd/href">https://medium.com/media/d477e601d2bb1de0a8b16ef1c8f0d1bd/href</a></iframe><p>Replace the APP_ID and APP_VERSION with your application’s values for each of them. Go to <a href="https://dashboard.ionicjs.com/">Ionic Dashboard</a> and copy your <em>Ionic Pro App ID</em> as shown in the image below. This APP_ID makes sure that Ionic Monitor is targeting the appropriate app for error tracking.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FRBV4mxazfEu86HOvDjvFw.png" /><figcaption><em>Copying APP_ID from Ionic Dashboard</em></figcaption></figure><p>You will also need the value for the APP_VERSION . This is useful when shipping newer versions of the app and identifying which version the errors on Ionic Monitor are referring to. The value of APP_VERSION should be similar to the version of your package.json or config.xml (highly recommended).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q1jZp2R68ipPK_Gsja3jMg.png" /><figcaption><em>Copying APP_VERSION from </em><em>package.json or </em><em>config.xml</em></figcaption></figure><p>Once that is taken care of, add AppErrorHandlerProvider to the providers in the app.module.tsfile as shown below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b577ae30d68d4110a873e846e05129b8/href">https://medium.com/media/b577ae30d68d4110a873e846e05129b8/href</a></iframe><p>Ionic Monitor is now set up. As an example, I created a page in the application named Monitorcontaining several buttons, each triggering a different implementation of the monitoring service. See the page in action and the results below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*0YTDigzd_yx9uVx5wv-GuQ.gif" /><figcaption><em>Triggering errors manually</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ko_IVif_8vvJT75CDBEsww.png" /><figcaption><em>Event Log: Errors List</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aqKlDkgp_On_5AtdVpNLtA.png" /><figcaption><em>Event Log: Error Details</em></figcaption></figure><p>Notice that the Exception Detail contains references to main.js, and on the right the information shows Source Mapped value as NO . This means that the source maps have not been configured/synced with the Ionic Pro services. To do that, run the command below (using Ionic CLI 3.9.0 or greater) in your terminal:</p><pre>ionic monitoring syncmaps</pre><h3>Using SourceMaps</h3><p>When using source maps, make sure to do the following:</p><ul><li>Sync the source maps <strong>before</strong> pushing a release to Ionic Pro.</li><li>Do not sync more than once per release as mentioned in <a href="https://ionicframework.com/docs/pro/monitoring/">Ionic Monitor docs</a>:</li></ul><blockquote><em>Before doing a release, ensure you’ve synced source maps and make sure to not send new source maps for that version in the future.</em></blockquote><ul><li>The version number of the running app should match the version of the source maps.</li><li>Utilizing <a href="https://semver.org/">semver</a> for versioning helps in detecting regressions by comparing the version of the app in which the error occurred versus future releases of the app.</li></ul><p>You can also upload the source maps manually. To do that, go to <a href="https://dashboard.ionicjs.com/">Ionic Dashboard</a>. Click the <em>Monitoring</em> tab, then click the <em>source maps</em> button on the top right. You need to do a <strong>dev</strong> or <strong>prod</strong>build to generate source maps in YOUR_APP/.sourcemaps/. Upload main.js.map along with other .map files related to your code.<br>After following the steps above, you should see your synced source maps in the Ionic Dashboard as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DTSi2VXXHWf9MLQWJScgew.png" /></figure><p>When you open the app again, tap the <em>Call wrapped function</em> button to trigger the same error as in the prior images. You will now see the .ts stack trace as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PWXK0hk7KiwxQIhXun6aYw.png" /></figure><p>Besides having manual triggers, our app also catches any errors automatically since we’re using AppErrorHandlerProvider as the ErrorHandler. Below is an example of an error that occurred when the app property is set to null:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9FTosnwuzrZPa1_Xmw8deg.png" /></figure><h3>Summary</h3><p>Ionic Monitor is a great tool that helps you find errors before they become painful for end users. With email alerts, you are notified as soon as something goes bad in your application. Since Monitor can pinpoint the errors to their exact .ts sources, there is less chance of panic attacks for you in the process of fixing the issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/329/0*VczraBhrsbxUA0C1.gif" /></figure><h3>Part 4</h3><p>In <a href="https://medium.com/@ahsan.ayaz/building-better-ionic-apps-with-ionic-pro-part-4-3efccf7a0089">Part 4</a>, we will go through Ionic Deploy, a service that makes it super easy to deploy app updates in real time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c771b96be8b9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/modus-create-front-end-development/building-better-ionic-apps-with-ionic-pro-part-3-c771b96be8b9">Building Better Ionic Apps with Ionic Pro, Part 3</a> was originally published in <a href="https://medium.com/modus-create-front-end-development">Modus Create: Front End Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Better Ionic Apps with Ionic Pro, Part 2]]></title>
            <link>https://medium.com/modus-create-front-end-development/building-amazing-ionic-apps-with-ionic-pro-part-2-a1878a34e663?source=rss----672b4ec5a5c7---4</link>
            <guid isPermaLink="false">https://medium.com/p/a1878a34e663</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[hybrid-app-development]]></category>
            <category><![CDATA[ionic]]></category>
            <dc:creator><![CDATA[Muhammad Ahsan Ayaz]]></dc:creator>
            <pubDate>Mon, 29 Jan 2018 20:21:40 GMT</pubDate>
            <atom:updated>2018-02-25T07:28:19.190Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wtcZ104972bBAJroCFdbFw.jpeg" /></figure><pre><a href="https://medium.com/modus-create-front-end-development/building-amazing-hybrid-apps-with-ionic-pro-b4866fdd9d72">Part1: Ionic Creator</a><br><a href="https://medium.com/modus-create-front-end-development/building-amazing-ionic-apps-with-ionic-pro-part-2-a1878a34e663">Part2: Ionic DevApp</a><br><a href="https://medium.com/modus-create-front-end-development/building-better-ionic-apps-with-ionic-pro-part-3-c771b96be8b9">Part3: Ionic Monitor</a><br><a href="https://medium.com/@ahsan.ayaz/building-better-ionic-apps-with-ionic-pro-part-4-3efccf7a0089">Part4: Ionic Deploy</a></pre><p>In <a href="https://medium.com/modus-create-front-end-development/building-amazing-hybrid-apps-with-ionic-pro-b4866fdd9d72">Part 1</a> of this series, we created a rapid prototype using Ionic Creator. In Part 2 we’ll talk about the Ionic DevApp to see how it helps in developing apps faster.</p><p>According to a <a href="https://ionicframework.com/survey/2017#results">survey by Ionic</a>, <strong><em>94.3%</em></strong> of developers are targeting <strong>Android</strong> while <strong>83.2%</strong> of them targeted <strong>iOS</strong>. Tablets and Progressive Web Apps (PWA) come next in being the most targeted platforms. In general, hybrid apps with Ionic have always been fast. But it usually took hours to set up the environment and tools to run/debug on devices.</p><p>Luckily, Ionic <a href="https://blog.ionicframework.com/announcing-ionic-devapp/">announced</a> the Ionic DevApp on 31st Oct 2017.</p><h3>What is Ionic DevApp?</h3><p>Ionic DevApp is an app that runs on your iOS/Android device. It comes with tons of pre-installed native plugins (<a href="https://ionicframework.com/docs/pro/view.html#plugin-support">view plugin support here</a>). This makes it easier to test native plugins and any applications you are developing. When you run ionic serve, it installs the application onto all the devices running the Ionic DevApp. What’s awesome is that it is free and available for <a href="https://itunes.apple.com/us/app/ionic-devapp/id1233447133?ls=1&amp;mt=8">iOS</a> and <a href="https://play.google.com/store/apps/details?id=io.ionic.devapp&amp;hl=en">Android</a>.</p><h3>Why you should try Ionic DevApp</h3><p>The following features make Ionic DevApp great for developing Ionic apps:</p><ul><li><strong>It has pre-installed </strong><a href="https://ionicframework.com/docs/pro/view.html#plugin-support"><strong>native plugins</strong></a><strong>.</strong> You may have an app that depends on some of the native plugins. They’re super easy to debug as you change your code because all it takes is running ionic serve.</li><li><strong>No need to install the native SDKs.</strong> This removes the need to set up Android SDK. And you don’t need to install Android Studio or Xcode to view your apps on devices.</li><li><strong>Find your apps running on local network.</strong> Ionic DevApp connects to your Wifi. As soon as you run ionic serve, DevApp identifies and loads your apps, so you can preview them in the app.</li><li><strong>LiveReload FTW.</strong> You can see all code changes immediately on any device running DevApp. This makes development faster.</li></ul><h3>Let’s use it</h3><p>If you do not have the latest version of the Ionic CLI installed, run the command below:</p><pre>npm install -g ionic</pre><p>Download the Ionic DevApp (<a href="https://itunes.apple.com/us/app/ionic-devapp/id1233447133?ls=1&amp;mt=8">iOS</a>/<a href="https://play.google.com/store/apps/details?id=io.ionic.devapp&amp;hl=en">Android</a>) on your device(s).</p><p>Make sure your device and your computer are on the same WiFi network.</p><ul><li>Open DevApp on your device(s).</li><li>Run ionic serve from your computer. This should bring up the app inside the DevApp running on your device.</li><li>Click on the app’s name. Now you have your app running on a physical device with <em>native plugin support</em> and <em>live reload</em>.</li></ul><p>See the notes-app in action below. On the left we have the terminal and on the right, we have our actual device’s screen casting through <a href="https://chrome.google.com/webstore/detail/vysor/gidgenkbbabolejbgbpnhbimgjbffefm">Vysor</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*3Daw-oCwBwIevXCcKbFmiQ.gif" /></figure><p>See <strong>LiveReload</strong> in action below:</p><p>If you have already used the <a href="https://ionicframework.com/pro/view">Ionic View app</a>, you might be thinking that Ionic DevApp is quite similar to that. In essence, the Ionic team decided to split the Ionic View app into two apps: the new Ionic View app and Ionic DevApp. While Ionic DevApp is focused on rapid development and local testing on devices, Ionic View is focused on helping developers share test distributions with product managers and other team members. You can read more about Ionic View <a href="https://ionicframework.com/docs/pro/view/">here</a>.</p><p>While this demo only has one device showing, you can have more devices running Ionic DevApp. You can see how fast it shows the updated result on the real device.</p><h3>Part 3</h3><p>In <a href="https://medium.com/@ahsan.ayaz/building-better-ionic-apps-with-ionic-pro-part-3-c771b96be8b9">Part 3</a> of this series, we will set up monitoring for our application using <a href="https://ionicframework.com/pro/monitor">Ionic Monitor</a>. We will go through what the service offers and how we can use it to make better, more reliable hybrid apps with Ionic.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1878a34e663" width="1" height="1" alt=""><hr><p><a href="https://medium.com/modus-create-front-end-development/building-amazing-ionic-apps-with-ionic-pro-part-2-a1878a34e663">Building Better Ionic Apps with Ionic Pro, Part 2</a> was originally published in <a href="https://medium.com/modus-create-front-end-development">Modus Create: Front End Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Better Ionic Apps with Ionic Pro, Part 1]]></title>
            <link>https://medium.com/modus-create-front-end-development/building-amazing-hybrid-apps-with-ionic-pro-b4866fdd9d72?source=rss----672b4ec5a5c7---4</link>
            <guid isPermaLink="false">https://medium.com/p/b4866fdd9d72</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[hybrid-app-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ionic]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Muhammad Ahsan Ayaz]]></dc:creator>
            <pubDate>Tue, 23 Jan 2018 15:04:01 GMT</pubDate>
            <atom:updated>2018-02-25T07:28:14.978Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-xhd_5ZrMnYvf4nlKDK2kQ.jpeg" /></figure><pre><a href="https://medium.com/modus-create-front-end-development/building-amazing-hybrid-apps-with-ionic-pro-b4866fdd9d72">Part1: Ionic Creator</a><br><a href="https://medium.com/modus-create-front-end-development/building-amazing-ionic-apps-with-ionic-pro-part-2-a1878a34e663">Part2: Ionic DevApp</a><br><a href="https://medium.com/modus-create-front-end-development/building-better-ionic-apps-with-ionic-pro-part-3-c771b96be8b9">Part3: Ionic Monitor</a><br><a href="https://medium.com/@ahsan.ayaz/building-better-ionic-apps-with-ionic-pro-part-4-3efccf7a0089">Part4: Ionic Deploy</a></pre><p>With the technology shift in the modern era of computation, over 44 percent of the world’s population was <a href="https://www.strategyanalytics.com/strategy-analytics/blogs/smart-phones/2016/12/21/44-of-world-population-will-own-smartphones-in-2017#.WlTR45P1VTY">predicted to use smartphones by 2017</a>. According to <a href="https://www.statista.com/statistics/330695/number-of-smartphone-users-worldwide/">Statista</a>, the number of smartphone users around the globe is around <strong><em>2.32 billion</em></strong>. For almost every new business coming into existence, the medium of connecting to the customers/audience is via cell phones. In other terms, <strong><em>mobile apps</em></strong>.</p><p>While performance, user interface, and user experience are important aspects of an application for an end user, there are other factors that are important for the developers and the development environment too. This includes the language, the framework (if any), as well as the tooling and the ecosystem that surrounds the language (and/or the framework). And <a href="https://ionicframework.com/">IONIC</a> is by far one of the best frameworks out there that lets you create <em>quick</em> hybrid mobile applications with a strong ecosystem and tooling.</p><h3>Ionic Pro</h3><p>While Ionic is awesome for creating hybrid mobile apps, Team Ionic also introduced <a href="https://ionicframework.com/pro">Ionic Pro</a>. It is a cloud platform that integrates your Ionic app with a number of cool tools that let you:</p><ul><li>Privately share test versions with a simple email invitation</li><li>View all tester feedback in a central dashboard</li><li>Deliver different versions and releases to specific segments of users</li><li>Track and analyze errors in your code to improve app quality</li><li>*Ship updates in realtime, without going through the app stores</li></ul><p>*While Apple allows hot code pushes, it only allows code pushes that execute inside the webview or the JavaScript core itself. Any updates that affect the Native SDKs have to go through the App Store’s distribution process. See section 2.4.5.7 of the <a href="https://developer.apple.com/app-store/review/guidelines/">App Store Review Guidelines</a>.</p><p>You can read more about what Ionic Pro offers <a href="https://blog.ionicframework.com/announcing-ionic-pro-for-teams/">here</a>. We will go through Ionic Pro’s tools and services to create a sample Ionic application that leverages the power of the platform. To follow along, you have to <a href="https://dashboard.ionicjs.com/signup">create an account on the ionic platform first</a>.</p><h3>Ionic Creator</h3><p>We’ll start with using Ionic Creator to initiate our app and with its easy-to-use interface, we’ll develop the app quickly. For creating rapid prototypes, it is highly recommended to use Ionic Creator. First, you need to <a href="https://creator.ionic.io/app/login">log in</a> to the Ionic Creator app. The application I’ve created using Ionic Creator looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*mY3P_MyhveulN1nHLBW9Cw.gif" /><figcaption><em>Our app, built with Ionic Creator</em></figcaption></figure><p>Once you’re done prototyping, you can export your app using the Export button as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9gG7ylZuMxc8zMh5VdpbbQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PY2SgDit5J50hVVXYGvE7g.png" /></figure><p>Once you’ve downloaded the zip, extract its contents to a folder. You can then create a new project for your app. For this, it is required that you have the <a href="https://ionicframework.com/docs/cli/#installation">latest version of Ionic CLI</a> installed. You can then open a terminal/command prompt and type:</p><pre>ionic start notes-app</pre><p>Select the blank starter project. After doing some processing, the Ionic CLI may ask you the following:</p><pre>Install the free Ionic Pro SDK and connect your app? (Y/n)</pre><p>Press Y and then enter to continue. It may then ask for your email:</p><pre>Log into your Ionic account<br>If you don&#39;t have one yet, create yours by running: ionic signup<br>? Email:</pre><p>You can enter your email to log in. Once you’re logged in, the Ionic CLI will ask for your preferred way of connecting to Ionic Pro:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*JxPRjnppCr_Oq2bZ.png" /></figure><p>You may choose based on your preference. Once that is taken care of and the process is finished, it will ask you which app you want to link to this project:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*49WB5cQ5NfTUXGJj.png" /></figure><p>Select Create new app for now and name it notes-app (or a name you like). Once that’s taken care of, you’ll see a beautiful message from the CLI explaining the next steps:</p><pre>Next Steps:</pre><pre>* Go to your newly created project: cd ./notes-app</pre><pre>* Get Ionic DevApp for easy device testing: <a href="https://bit.ly/ionic-dev-app">https://bit.ly/ionic-dev-app</a></pre><pre>* Finish setting up Ionic Pro Error Monitoring: <br>https://ionicframework.com/docs/pro/monitoring/#getting-started</pre><pre>* Finally, push your code to Ionic Pro to perform real-time updates, and more: git push ionic master</pre><p>I personally love that the CLI is guiding the developers to the amazing stuff itself. Now, we’ll copy the contents from the zip in our project. Below is a comparison of the contents in our source folder and in our target folder:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/0*ockLWOngmjoWiFVC.png" /></figure><p>Copy the unzipped files and folders to the src folder of the project. Replace/Overwrite any duplicate files if prompted. Once you have done that, execute the command below to see the app up and running:</p><pre>ionic serve</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*wpvq36de9EEuxuLY.gif" /></figure><p>You might see some differences in the element styles rendered via ionic serve. The reason is that Ionic Creator focuses more on the element’s structure and shows the basic styles of each component. This is a great way to start building your app visually. You can then export and start working on the features.</p><h3>Part 2</h3><p>In <a href="https://medium.com/modus-create-front-end-development/building-amazing-ionic-apps-with-ionic-pro-part-2-a1878a34e663">part two</a>, we will see how to use the <a href="https://ionicframework.com/docs/pro/devapp/">Ionic Dev App</a> which makes for really fast viewing and debugging your applications on your devices (Android &amp; iOS) without having to go through the hectic process of installing the Native SDK(s).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4866fdd9d72" width="1" height="1" alt=""><hr><p><a href="https://medium.com/modus-create-front-end-development/building-amazing-hybrid-apps-with-ionic-pro-b4866fdd9d72">Building Better Ionic Apps with Ionic Pro, Part 1</a> was originally published in <a href="https://medium.com/modus-create-front-end-development">Modus Create: Front End Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular Elements — Your ngComponents everywhere]]></title>
            <link>https://medium.com/modus-create-front-end-development/angular-elements-your-ngcomponents-everywhere-a4cd17cfb569?source=rss----672b4ec5a5c7---4</link>
            <guid isPermaLink="false">https://medium.com/p/a4cd17cfb569</guid>
            <category><![CDATA[web-components]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Muhammad Ahsan Ayaz]]></dc:creator>
            <pubDate>Sat, 04 Nov 2017 15:51:17 GMT</pubDate>
            <atom:updated>2017-11-04T15:51:17.116Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*3aujAwgNP4NL58q3252VVw.png" /></figure><p>If you’re reading this, you already know Angular. So whether you’ve worked on<a href="http://angularjs.org/"> AngularJS</a> (1.x) or<a href="http://angular.io/"> Angular</a> (Angular2+), this article is about one of the exciting things going on in the Angular world.</p><p>Angular has been one of the most popular frameworks for the past few years. It started as a library that enhanced the HTML. And now it has a huge ecosystem that contains<a href="https://github.com/angular/angular-cli"> CLI</a>,<a href="https://universal.angular.io/"> Server side rendering</a>,<a href="https://www.npmjs.com/package/@angular/animations"> Animations</a> e.t.c. and it is still growing with things like<a href="https://www.npmjs.com/package/@angular/service-worker"> Angular service worker</a>. While these are making Angular awesome, there are some experimental projects in the ecosystem which are exciting.</p><p>Team Angular announced a new idea called <strong>Angular Labs</strong> during their recent conference at<a href="https://angularmix.com/#!/workshops"> Angular Mix</a>. The idea of Angular Labs is to keep the community in sync about new experiments before releasing them to the public (that’s an Angular thing for sure). There are four initiatives that fall under the hood of Angular Labs to date:</p><ol><li>Schematics</li><li>Angular Elements</li><li>CDK ( Component Dev Kit )</li><li>ABC ( Angular + Bazel + Closure )</li></ol><p>While all of these are exciting, I’ll go with <strong>Angular Elements </strong>for this article.</p><h3>What are Angular Elements?</h3><p>Angular Elements are<a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Custom_Elements"> Custom Elements</a>. You can embed them into any web application. This enables us to write re-usable Angular components &amp; widgets which we can use inside<a href="https://reactjs.org/"> React</a>,<a href="https://vuejs.org/"> Vue</a>,<a href="https://preactjs.com/"> Preact</a> or even with vanilla JS apps. The Angular Elements will blend in every framework. Below are some features of Angular Elements:</p><ul><li>They are <strong>Self Bootstrapping</strong></li><li>They actually <strong>host</strong> the Angular Component inside a <strong>Custom Element</strong></li><li>They’re a bridge between the<strong> DOM APIs</strong> and Angular <strong>Components</strong></li><li>Anyone can use it <strong>without</strong> having the knowledge of how Angular works.</li></ul><h3>How to create an Angular Element</h3><p>You can follow these steps to create your Angular Elements</p><ul><li>Fork (or clone)<a href="https://github.com/robwormald/angular-elements"> angular-elements repo</a></li><li>Create your widget/app folder inside src/demos folder (e.g. test-app )</li><li>Create your app’s module (e.g. TestAppModule -&gt; test-app.module.ts)</li><li>Create your component (e.g. TestComponent -&gt; test.component.ts)</li><li>Once your app is completed, run the webpack build to generate ngfactory files for your app by running the below command:</li></ul><pre>npm run build</pre><ul><li>Use the custom_element_adapter to generate your Angular Element in your demo folder (e.g. src/demos/test-app with your ng-element named test-app.ngelement.ts )</li></ul><pre>import nge from &#39;../../custom_element_adapter&#39;;</pre><pre>import { TestAppNgFactory } from &#39;../../ngfactory/src/demos/test-app/test-app.ngfactory&#39;;</pre><pre>nge.define( TestAppNgFactory );</pre><ul><li>After that, add your demo as an entry inside webpack.config.js as follows:</li></ul><pre>entry: {<br>  &#39;todo-app&#39;: &#39;./lib/demos/todo-app/todo-app.ngelement.js&#39;,<br>  ..<br>  &#39;test-app&#39;: &#39;./lib/demos/test-app/test-app.ngelement.js&#39;<br>}</pre><ul><li>You can then create an html file in the public folder (e.g. test-app.html ) having content as follows:</li></ul><pre>&lt;html&gt;<br>    &lt;head&gt;<br>        &lt;meta charset=&quot;UTF-8&quot;&gt;<br>        &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>        &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;ie=edge&quot;&gt;<br>        &lt;title&gt;Ng Elements Playground - Test App&lt;/title&gt;<br>        &lt;script src=&quot;es5-shim.js&quot;&gt;&lt;/script&gt;<br>        &lt;script src=&quot;angular.js&quot;&gt;&lt;/script&gt;<br>        &lt;script src=&quot;test-app.js&quot; async&gt;&lt;/script&gt;<br>    &lt;/head&gt;<br>    &lt;body&gt;<br>        &lt;test-app&gt;&lt;/test-app&gt;<br>    &lt;/body&gt;<br>&lt;/html&gt;</pre><p>I also added a demo app (<a href="https://ahsanayaz.github.io/angular-elements-demos/stop-watch-app/">Stop Watch App</a>) and created a <a href="https://github.com/robwormald/angular-elements/pull/1/commits/0ad6ea9341dd22eb33ac8021043bc90011241b6e">PR</a> against the <a href="https://github.com/robwormald/angular-elements">angular-elements repository</a>.</p><h3>Conclusion</h3><p>I liked the flexibility and possibilities Angular Elements are bringing to the table, even though they are not ready to use right away. I hope we’ll see Angular Elements being stable in a few months.</p><p>Sharing is caring! Please hit that 👏 and share this article with anyone who might enjoy it. You may star the repos (<a href="https://github.com/robwormald/angular-elements">Angular Elements,</a><a href="https://github.com/AhsanAyaz/angular-elements-demos"> Angular Elements Demos)</a> or contribute to them too. For more like this, follow<a href="https://medium.com/modus-create-front-end-development"> Modus Create: Front End Development</a> or find me on<a href="http://twitter.com/ahsan_ayz"> Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4cd17cfb569" width="1" height="1" alt=""><hr><p><a href="https://medium.com/modus-create-front-end-development/angular-elements-your-ngcomponents-everywhere-a4cd17cfb569">Angular Elements — Your ngComponents everywhere</a> was originally published in <a href="https://medium.com/modus-create-front-end-development">Modus Create: Front End Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>