Angular First App
Here are the steps to create your first Angular app
- Open a command prompt or terminal window and navigate to the directory where you want to create your Angular app.
- Open a command prompt or terminal window and navigate to the directory where you want to create your Angular app.
- Change into the project directory by running the following command:
- Start the development server by running the following command:
- Open your code editor and navigate to the "src/app" directory.
- Open the "app.component.html" file and replace the existing code with the following
- Save the changes to the file and go back to your web browser. You should now see the message "Welcome to my first Angular app!" displayed in your web browser.
ng new my-angular-app
Note: Replace "my-angular-app" with the name of your project.
cd my-angular-app
ng serve --open
Note: The "--open" flag will automatically open your default web browser and navigate to http://localhost:4200, which is where your Angular application will be running.
Welcome to my first Angular app!
That's it! You have now created and run your first Angular app. You can continue to modify the files in the "src/app" directory to build more complex applications.