Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add Angular 9 and Ivy support #2065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
VladimirAmiorkov wants to merge 18 commits into master from amiorkov/ivy
Closed

Conversation

@VladimirAmiorkov
Copy link
Contributor

@VladimirAmiorkov VladimirAmiorkov commented Nov 12, 2019

PR Checklist

What is the current behavior?

Current package does not work with Angular 9.0.0-rc.1 version.

What is the new behavior?

Current package does works with Angular 9.0.0-rc.1 version.

Fixes/Implements/Closes #[Issue Number].
Resolves #2060

VladimirAmiorkov added 12 commits November 12, 2019 17:42
Copy link

Any idea when this will be merged?

ceelian, SmailHammour, sublime392, hrueger, Jmchemama, vincentpalita, Codex-, vahidvdn, lamqson, yatinkapur, and 3 more reacted with eyes emoji

Copy link
Contributor

NathanWalker commented Feb 18, 2020
edited
Loading

@MattRiddell I took over from where @VladimirAmiorkov left off and got things working with Ivy enabled here:
#2124

So everyone here does not need to wait until that new PR is merged, you can do the following to try the new v9 by doing the following:

  1. Download a prepacked @nativescript/angular v9 here:
    https://drive.google.com/file/d/1MyKOetI5aLc7gA_M3rKrNS-1RqztOwDs/view?usp=sharing

Put the .tgz file at root of your {N} project.

  1. Download a prepacked nativescript-angular compatibility reference here (this is mainly to allow other plugins which may not use the new @NativeScript scope to still work):
    https://drive.google.com/file/d/1xQ7O66qE2hmTbeChL1nbFqh4rCEEaor0/view?usp=sharing

Put the .tgz file at root of your {N} project.

  1. Then modify you package.json as follows:
  • Add to your scripts section:
"scripts": {
 "ngcc": "ngcc",
 "postinstall": "ngcc"
}
  • Modify dependencies as follows:
"@nativescript/angular": "file:nativescript-angular-v9.tgz",
"nativescript-angular": "file:nativescript-angular-compat.tgz",

Then just make sure all your @angular dep's are updated to ~9.0.0, for example:
"@angular/core": "~9.0.1"

Also make you are using at least 1.4.0 or 1.5.0 of nativescript-dev-webpack in devDependencies.

  1. Modify your tsconfig.json to include this (parallel to compilerOptions):
"compilerOptions": {
 ...your various options, etc.
},
"angularCompilerOptions": {
 "enableIvy": true
}

Then clean you project completely:

rm -rf node_modules/ platforms/ package-lock.json hooks

Then run with the following:

tns run ios --emulator --env.aot --no-hmr

Best to always use AoT all the time since Ivy works with it by default and also good to disable hmr as seems there's some other things to get hmr working with ivy.

If you end up seeing an error like this:

ERROR in The target entry-point "nativescript-ngx-fonticon" has missing dependencies:
 - file-system

You can add a new file ngcc.config.js to the root of your project with contents like this which helps the ngcc compiler for Ivy:

module.exports = {
 "packages": {
 "@nativescript/angular": {
 "entryPoints": {
 ".": {
 "override": {
 "main": "./index.js",
 "typings": "./index.d.ts",
 },
 "ignoreMissingDependencies": true,
 }
 }
 },
 "nativescript-ngx-fonticon": {
 "entryPoints": {
 ".": {
 "override": {
 "main": "./nativescript-ngx-fonticon.js",
 "typings": "./nativescript-ngx-fonticon.d.ts",
 },
 "ignoreMissingDependencies": true,
 }
 }
 },
 "@nota/nativescript-accessibility-ext": {
 "entryPoints": {
 ".": {
 "override": {
 "main": "./index.js",
 "typings": "./index.d.ts",
 },
 "ignoreMissingDependencies": true,
 }
 }
 }
 }
}

Then try cleaning project and rebuild/run again after adding the ngcc.config.js file.

patrick-nurt, rsurjano, and two-bridges reacted with thumbs up emoji

Copy link

thegnuu commented Mar 3, 2020

Is there an estimated date when this will be available?

We are using immer in our application and we need typescript 3.7 that we are able to create our next release ;)

I know that I am able to patch this version into our project, but I am not really under pressure to create a new release and if it takes just a few weeks to publish this I would like to wait for the release...

If it will take months I am happy to follow the instructions to patch it!

Thank you for your help!

hrueger and dtomaszewski reacted with thumbs up emoji

Copy link

mavaanan commented Mar 3, 2020

We would also need this support ASAP. Can you give some time estimate for Angular 9.0.2+ support?

Copy link

Is this progressing? Releases used to be aligned with Angular, has something changed in the relationship with working with the google team?

Copy link
Contributor Author

With deep sadness I must inform you that I am no longer working on the NativeScript project. It has been a great journey and my work on the Angular 9 Ivy implementation in NativeScript has been taken over in the this PR #2124 . Please follow it and contribute to it as you can.

MattRiddell, bellalMohamed, JohannesHoppe, and rsurjano reacted with confused emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Angular 9

AltStyle によって変換されたページ (->オリジナル) /