Angular Getting Started - First Program

  • Resources
  • The first program
    • Create a work space and initial application
      • In the working directory ng new [projectname] to create a new project, and the code will automatically create a project structure skeleton, e2e test project structure skeleton.
        • ng new command will prompt you to provide what features should be included in the initial application. Press Enter or Return key to accept the default.
          • Will let you choose whether to use Angular routing module. Would you like to add Angular routing?
          • Will let you choose a style sheet format to be used, typically include CSS, SCSS, Sass, Less, Stylus. Which stylesheet format would you like to use? (Use arrow keys)
        • Angular CLI will install the necessary Angular npm packages and other dependencies. This may take several minutes.
    • Run / debug applications
      • Angular CLI contains a server, allowing you to build and deliver applications locally.
      • step
        • Go to the workspace folder (my-app).
        • Using CLI commands ng serve and --open option to start the server.
          • ng serve command starts the development server, monitor file, and rebuild the application (automatic rebuild) when these file changes.
          • --open (or only abbreviated -o) option to automatically open your browser and visit HTTP: // localhost: 4200 / .

Guess you like

Origin www.cnblogs.com/wyp1988/p/11314603.html