https://github.com/andrewjbateman/angular-tutorial-app
:clipboard: Simple app to display a list of servers and indicate whether the server is on or offline. Created as part of Udemy Angular course.
https://github.com/andrewjbateman/angular-tutorial-app
angular angular-tutorial angular13 bootstrap4 css forms html5 tutorial-code
Last synced: 3 months ago
JSON representation
:clipboard: Simple app to display a list of servers and indicate whether the server is on or offline. Created as part of Udemy Angular course.
- Host: GitHub
- URL: https://github.com/andrewjbateman/angular-tutorial-app
- Owner: AndrewJBateman
- License: mit
- Created: 2019-02-01T16:40:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-04T06:49:57.000Z (over 2 years ago)
- Last Synced: 2024-12-27T02:45:20.613Z (5 months ago)
- Topics: angular, angular-tutorial, angular13, bootstrap4, css, forms, html5, tutorial-code
- Language: TypeScript
- Homepage:
- Size: 4.04 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :zap: Angular Tutorial App
* A simple Angular app to display a list of servers and indicate whether the server is on or offline.
* Server names can be added to the list.
* **Note:** to open web links in a new window use: _ctrl+click on link_


## :page_facing_up: Table of contents
* [:zap: Angular Tutorial App](#zap-angular-tutorial-app)
* [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)
* [:books: General info](#books-general-info)
* [:camera: Screenshots](#camera-screenshots)
* [:signal_strength: Technologies](#signal_strength-technologies)
* [:floppy_disk: Setup](#floppy_disk-setup)
* [:computer: Code Examples](#computer-code-examples)
* [:cool: Features](#cool-features)
* [:clipboard: Status & To-Do List](#clipboard-status--to-do-list)
* [:clap: Inspiration](#clap-inspiration)
* [:file_folder: License](#file_folder-license)
* [:envelope: Contact](#envelope-contact)## :books: General info
* This course project is to help learn about basic Angular concepts, including using components, data & property binding, the formsmodule etc.
## :camera: Screenshots
.
## :signal_strength: Technologies
* [Angular v13](https://angular.io/)
* [RxJS Library v6](https://angular.io/guide/rx-library) used to handle datastreams and propagation of change using observables.
* [Angular Augury Chrome Extension](https://chrome.google.com/webstore/detail/augury/elgalmkoelokbchhkhacckoklkejnhcd) v1.23.0 used for debugging.## :floppy_disk: Setup
* Install dependencies by running `npm i`
* Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files
* Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build## :computer: Code Examples
* _server component with functions used to generate html template data._
```typescript
import { Component } from '@angular/core';@Component({
selector: 'app-server',
templateUrl: './server.component.html',
styles: [`
.online {
color: white;
}
`]
})
export class ServerComponent {
serverId = 10;
serverStatus = 'offline';// use a random number generator function to get a random status of on or offline
constructor() {
this.serverStatus = Math.random() > 0.5 ? 'online' : 'offline';
}// function to return the random server status
getServerStatus() {
return this.serverStatus;
}// function to show online status with a green background and offline with red.
getColor() {
return this.serverStatus === 'online' ? 'green' : 'red';
}
}
```## :cool: Features
* Server names can be added via a form-control input field.
* The background color of each server in the list changes depending on the online status of the server.## :clipboard: Status & To-Do List
* Status: Working.
* To-Do: Nothing## :clap: Inspiration
* All code is from [Maximilian Schwarzmüller's Angular course](https://www.udemy.com/the-complete-guide-to-angular-2/learn/v4/overview) - now 2022 edition
## :file_folder: License
* This project is licensed under the terms of the MIT license.
## :envelope: Contact
* Repo created by [ABateman](https://github.com/AndrewJBateman), email: [email protected]