Preliminary study on angularjs6.x---environment construction

Source: Internet
Author: User

Preliminary study on angularjs6.x---environment construction

* Recent projects, just use the ANGULARJS, so just want to tidy up Cheng Bowen, avoid back to forget. First Contact Angularjs was two years ago, when the company used the bootstrap to do the page, Then cooperate with angularjs1.x to do some processing. Later people strongly recommended to use 2.x. Said 2.x than 1.x has a very big change, but has not been empty to the whole, has been put to the present.

Angularjs6.x is still based on Nodejs, so if we want to build a ANGULARJS environment, first we want to install NODEJS, here to emphasize a little, If we want to use angularjs6.x then we have to install the Nodejs version must be greater than or equal to 8.x, and the NPM version must be greater than or equal to 5.x.
Here my operating system is centos7-1804, then the installation command is as follows:

    1. Add Nodejs address silently and install him into bash: Curl--silent--location https://rpm.nodesource.com/setup_10.x | sudo bash-
    2. Install Nodejs's compilation environment: Yum Install gcc-c++ make
    3. Installing nodejs:yum-y Install Nodejs

After installation, run Npm-v as follows

:

Run Node-v as follows:

With these two hints, it means that our Nodejs has been installed successfully, and then we started installing Angularjs/cli:sudo npm install-g @angular/CLI

There may be some installation errors here, at which point we can uninstall and reinstall, and the uninstall command is as follows:

    1. NPM uninstall-g angular-cli Uninstall the old version npm uninstall @angular/CLI Uninstall the new version
    2. NPM Cache Clean Cleanup Cache NPM Cache Verify–force Force cleanup cache

In addition, after we install the execution, may appear the same warning, this is because [email protected] is used by the Mac system, if we use the other system will appear such a reminder, so this is normal:

As of here, the environment is not ready to end, in the creation of the project, angularjs6.x also used the git command, if not installed, will be reported that the git command is not found, so we also need to install git. Because I prefer the new software, so I installed the git2.x:

    1. Yum Install https://centos7.iuscommunity.org/ius-release.rpm
    2. Yum Install git2u

        1. When the environment is ready, we start to create the project and run:
    3. ng New Conk-out
    4. CD Conk-out
    5. Ng Serve–open
      After running the effect as shown, see it shows that our environment is ready to complete:

Preliminary study on angularjs6.x---environment construction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.