Angular CLI - ng analytics Command


Advertisements

This chapter explains the syntax, argument and options of ng analytics command along with an example.

Syntax

The syntax for ng analytics command is as follows −

ng analytics <settingOrProject> <projectSetting> [options]

ng analytics command configures angular CLI usage metrics.

Arguments

The arguments for ng analytics command is as follows −

Sr.No. Argument & Syntax Description
1 <settingOrProject>=on|off|ci|project|prompt

Directly enables or disables all usage analytics for the user, or prompts the user to set the status interactively, or sets the default status for the project. Following are the details of options.

  • on − Enables analytics gathering and reporting for the user.

  • off − Disables analytics gathering and reporting for the user.

  • ci − Enables analytics and configures reporting for use with Continuous Integration, which uses a common CI user.

  • prompt − Prompts the user to set the status interactively.

  • project − Sets the default status for the project to the projectSetting value, which can be any of the other values. The projectSetting argument is ignored for all other values of settingOrProject.

2 <projectSetting>=on|off|prompt Sets the default analytics enablement status for the project.

Options

Options are optional parameters.

Sr.No. Option & Syntax Description
1 --help=true|false|json|JSON

Shows a help message for this command in the console.

Default: false

First move to an angular project updated using ng build command,which is available at https://www.tutorialspoint.com/angular_cli/angular_cli_ng_build.htm.

Now run the analytics command.

Example

An example for ng analytics command is given below −

\>Node\>TutorialsPoint> ng analytics off

Useful Video Courses


Video

AngularJS Online Training

16 Lectures 1.5 hours

Anadi Sharma

Video

Angular 2 Online Training

28 Lectures 2.5 hours

Anadi Sharma

Video

Step By Step Angular For Beginnners

11 Lectures 7.5 hours

SHIVPRASAD KOIRALA

Video

Ionic & Angular JS: Principles Of Mobile and Web Development

16 Lectures 2.5 hours

Frahaan Hussain

Video

Angular 8 Full Stack Development With Spring Boot

Best Seller

69 Lectures 5 hours

Senol Atac

Video

JWT Role Based Authorization With Spring Boot And Angular 8

53 Lectures 3.5 hours

Senol Atac

Advertisements