What's New in and How to Upgrade to Angular 6

What’s New in and How to Upgrade to Angular 6

This post explains what’s new in Angular 6 and how to upgrade your Angular 5 apps.

Luchillo17

Little question, with the new CLI, Workspaces became a thing, how can we share code between applications? do we import the components of 1 application in the other? or do we have to rely on libraries?

Matt Raible

Hello Luchillo17, I haven’t had a chance to play with the workspaces feature yet, so I’m not certain. It looks like it allows you to share components between projects without publishing them to npm. When you create a new project with Angular CLI 6, it already has two projects in it - one for your app, and one for e2e tests.

Luchillo17

I guessed the same but the imports from project to project are going to be ugly, the reason i want to know is i want to embed an Ionic app there, share as much logic as possible, and only override the UI components specific to mobile, i’ve started a discussion in Ionic blog but seems lonely so far: https://forum.ionicframewor…

Niklas Speich Hegnelt

You can use the ‘paths’ section in tsconfig.json to make imports less ugly, for example:

“paths”: {
@features/": ["libs/shared/features/”],
@components/": ["libs/shared/components/”]
}

then you can import like so:

import { MyComponent } from ‘@components/my-component’

Luchillo17

Indeed, it’s just that i had trouble with those with webpack in the past, i’ll try again.
Btw did you took a look at the ionic forum?