Install angular-cli for angular 2 project - linux

I'm trying to install Angular-CLI to generate an angular2 project, but it seems that the cli generate an angular 4 project. how can I fix that ?

So jus to to save you some confusion, the latest version of Angular is 4.2.3, and I believe the CLI is at 1.1.2. The CLI will always configure your generate project to the the latest version of Angular (for the CLI).
Regardless of that, you shouldn't really stick on trying to create "Angular 2" applications. As a community the version number doesn't matter as much anymore. It's not like the migration from AngularJS (version 1) to Angular version 2. Angular version 4 is backwards compatible with Angular version 2. We aren't that concerned with version numbers. Anything and everything you do and how you do it in Angular version 2 will work as expected in the Angular version 4!
However by using the latest version you get new features (like the if/else directives).
Anyway, don't worry to much about the version number, you're just making Angular apps.

Related

laravelbook/ardent 3.6.0 not getting installed in Laravel 7.15.0

I have one Laravel 4.2 project which uses laravelbook/ardent and needs to updated to newest Laravel Version. But the problem is that laravelbook/ardent doesn't get installed and giving following error upon installation.
Now I don't know how to deal with this. Which Laravel version supports laravelbook/ardent?
as far as i know 3.6.0 is the last Ardent version and it matches with Laravel 5.1 version (since 3.0.0, check here https://github.com/laravel-ardent/ardent/releases).
You can eventually try pushing yourself a bit further with Laravel versions but, of course, you have to try.
I'm not sure I would update something to an already-old framework building my models around an abandoned plugin...

upgrading node for electron

I am creating an app using electron framework but when I'm trying to use async functions it gives me an error.
Because my electron uses node version 6.5.0 but node in this version doesn't support async functions.
So I am trying to upgrade my electron's node but I don't know how to create a branch or stuff like that since https://electronjs.org/docs/development/upgrading-node is the only link I found to explain this matter but I can't understand it. Can I upgrade node in my electron framework in another way?
Can I upgrade node in my electron framework in another way
No, you cannot. Electron links a specific version of node with chromium in its build time, so each version of electron have a fixed version of node.js and cannot be replaced dynamically.
Either use a higher version of the electron have higher node.js version, try to manually build electron yourself is the only way to go.

ExpressJs Compatibility with NodeJs Version

I am trying to find to see if expressjs 4 can support Nodejs 10.15.3 ( Lts) version. Is there any compatibility matrix that i can look into before deciding versions to choose?
If you check out express/package.json you can see that express needs node v0.10.0 or newer.
So yes, Express.js v4 is supporting Node.js v10.15.3.

Does it matter what versions of Angular third party modules installed via npm use?

I have an Ionic4 app using the most current version of Angular7. I installed a few node modules from third parties via npm install --save. The npm modules I installed via npm use Angular4 (when I look through the modules package.json on git), but my main Ionic app uses Angular7. Am I using 2 versions of Angular in my Ionic app and bloating it?
The simply answer is no, it doesnt matter what version of angular third party vendors use. Generally if a library how built using Angular 4 it can be consumed in an newer version of Angular eg) v6, v7 etc. One thing to look out for is the packages that you are consuming in your application, if a package was built with Angular 4 its a high possibility it contains other dependencies that was used and in some cases those packages that were used to build that library may come up as deprecated in newer versions of Angular.
To answer your comment, the answer is yes again; generally if you are using a newer version of Angular you should use the newer packages but if you do use a library that uses an older package, angular will adapt to the specification of that particular package.
Mark as answer is it helped, thank you.
IMPORTANT* when you are upgrading from the current version of angular to an advanced one, you should always install (using NPM install) the angular libraries first and only then the third party packages otherwise it could stuck your installation process and give you strange 'gyp-node' errors.
I think your app is working because ionic was made out of angular, as far as i know, one thing i could recommend to you, apart from the fact that you are asking one thing on the title of your question and then asking something else on your description, is to use NVM.
Stuff like angular, npm and ionic will be linked to your node version, so you could work with two different versions of node and all of the other stuff will not get mixed up, i really hope this helps you a little.

How to install latest ionic2 components

I am currently using ionic2 to try creating a cross plattform app. I know that ionic2 still is under heavy construction and that things (may) change at any time.
Still i wonder how I could install the latest components/api stuff from the nightly builds (or whereever they reside).
I am especially referring to the infiniteScroll Component that is mentioned in the API-Documents of ionic2.
Since i don't understand the layout of the components inside my project fully, i checked where i could see some of them in the directory structure. If i get this right, they all reside in <projectHome>/node_modules/ionic-framework/components?
At least lots of the components mentioned in the documentation above are listed there.
But as i can't find the infiniteScroll Component there, i would like to get some hints on how to install this (and the other missing ones) either by directly giving the respective commands or by pointing to appropriate documentation (i simply did not find anything although searched quite a while for it).
ionic info shows:
Your system information:
Cordova CLI: 6.0.0
Ionic Version: 2.0.0-beta.1
Ionic CLI Version: 2.0.0-beta.17
Ionic App Lib Version: 2.0.0-beta.8
ios-deploy version: 1.7.0
ios-sim version: 4.1.1
OS: Mac OS X El Capitan
Node Version: v5.6.0
Xcode version: Xcode 7.0 Build version 7A220
Sir,
Ionic made some changes in their latest commit. You could see the changes here in the changelog. (Mar 1)
The components are not present in 'ionic-framework/ionic' anymore and they are now present in 'ionic-angular'.
Infinite scroll was added in the release 2.0.0-beta.2, whereas you use the previous release 2.0.0-beta.1 So you might not be able to add it. You could change your package.json to reflect the latest version like shown below.
"ionic-angular": "2.0.0-beta.2",
I would recommend you to read the changelog as it would give a better idea. Hope this was helpful. Thanks.

Resources