Introducing Ionic v4

May 6, 2017 · 2 min read · 235 Words · -Views -Comments

Is there Ionic v4?

The official repo created a v4 branch and published its vision. I translated the key points here. Original: click here

Translation

Ionic components aim for these goals:

  • Users continue to build apps and components with Angular components
  • Development and build workflows remain unchanged
  • User‑visible changes are minimized
  • Reduced build time
  • Reduced startup time
  • Async loading of Ionic components becomes default

For most parts, ionic-angular will continue to work the same way, using all the same APIs. However, a small number of complex components like ion-badge will use the standard Web Components v1 spec, which is already implemented in mainstream browsers.

For browsers without Web Components support, polyfills will be added on demand, which is already implemented in v4.

We will continue to maintain the v3 main branch. Fundamentally, v3 and v4 differ internally, but externally they are equivalent for users.

Changes

@NgModule Updates

What’s great is that Angular already supports web components. To enable them, add CUSTOM_ELEMENTS_SCHEMA to the schemas property of @NgModule:

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from ‘@angular/core’;

@NgModule({ … schemas: [CUSTOM_ELEMENTS_SCHEMA] }) export class AppModule {}

ion-label Required

Previously an ion-label would automatically be added to ion-item if one wasn’t provided. Now an ion-label must always be added if the item displays text.

Item's Text!

Future goals

Ionic integrates the Web Components standard. One of our goals is to make Ionic components run easily in all major frameworks.

Authors
Developer, digital product enthusiast, tinkerer, sharer, open source lover