Open Ionic Project Again Show Wrong

Howdy, folks! I just wanted to share a few updates on things and talk about an astonishing new feature in the Ionic build process.

Framework Updates

RC3 has shipped ? ! We've been hard at work closing issues and improving the functioning of our components. 3 components in particular—Carte, Sliding Items, and DateTime—have had pregnant work done to improve their performance. For example, here are before and after shots of Menu from the developer tools:

Earlier
before

Later on
after

We're excited for you to exam these out and see the functioning increase!

Mistake Reporting

Last calendar week, both Max and I shared videos about the new fault reporting data in App Scripts. This fashion, we tin can remove the feared "white screen of death". Now, if something happens during your build, you'll get that data added correct away, instead of a blank screen.

We wanted to go fifty-fifty further, so we've improved on this and have also added run time mistake catching! For those who aren't quite sure what this is, imagine this situation…

Y'all're testing your app, tapping through screens, then of a sudden…zilch. The entire app stops, and yous tin't go back or go forwards to any pages. What happened?

We wanted to do away with that, so we've added a custom ErrorHandling class to Ionic that ties into the App Scripts dev server. Here's what it looks similar:

run-time-error

If for some reason y'all run across an error, at present we can display something meaningful and provide the right information. While this is absurd, we wanted to go beyond that and add a new bit of UI to this.

run-time-error-overlay

If you do get an error and want to reload the app, you can striking ctrl-shift-8 (cmd-shift-8 for mac) to display a list of debug options. Currently, nosotros only have the pick to reload the app, merely nosotros'll be expanding to include a few other options. What's even improve is that this sort of functionally is also available on a real device with live-reload!

          $ ionic run android -lc                  

One time information technology'south deployed, merely milk shake the device, and the debug action sheet will be displayed. Merely what about turning it off for production builds? This is handled automatically, in order to avoid any…awkward moments in a product app.

How to get information technology

In order to get this new feature, y'all'll want to make sure yous accept the most up to appointment CLI.

          $ npm install -g ionic   $ ionic -v # should render at least ii.1.12                  

If you're starting a new project, yous should exist good! But if y'all have an older projection that yous want to update, you'll desire to update the following packages.

          $ npm install ionic-angular@latest --save # get RC3 of ionic-athwart   $ npm install @ionic/app-scripts@latest --save-dev # get the latest app-scripts package                  

For a complete list of what your package.json should be updated to, check out the RC3 Changelog

After installing those packages, open src/app/app.module.ts and import ErrorHandler from angular and IonicErrorHandler from ionic-athwart.

          import { NgModule, ErrorHandler } from '@angular/core'; import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';  @NgModule({    // Hither we tell the Angular ErrorHandling class   // that it should be using the IonicErrorHandler class for any errors   providers: [{provide: ErrorHandler, useClass: IonicErrorHandler}] })                  

That'southward information technology! Now, whatever runtime errors tin can exist amend handled by Ionic'south build tools.

Ionic Module Template

We've heard many questions from developers trying to build reusable Angular ii and Ionic ii modules, and how to get them to piece of work with Athwart's ngc and Ahead-of-Time compiling. To assistance, we've put together a starting template that you can apply to build your own modules. It'southward a very new release, then please allow us know if you run into problems or have questions and nosotros'll get information technology sorted.

Ionic Module Template

Then what's left?

With App Scripts reaching a stable point, the framework is team focusing on the final batch of problems fixes and operation improvements, significant…we're in the terminal stretch here! It'south been a crazy route to get here, and from everyone at Ionic, nosotros couldn't have washed it without your input and help in testing things. Then, keep an heart out as we go heads down and work on getting 2.0 Concluding out the door.

Thanks!

gautiercamonect.blogspot.com

Source: https://ionicframework.com/blog/rc3-error-reporting-final-oh-my/

0 Response to "Open Ionic Project Again Show Wrong"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel