GithubHelp home page GithubHelp logo

andrewjbateman / angular-animated-list Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 2.38 MB

:clipboard: App using interpolation, property-binding, event-binding and Formbuilding to add text items to a list.

License: MIT License

JavaScript 10.49% TypeScript 74.51% HTML 8.70% SCSS 6.31%
html5 observables forms form-builder api angular coursetro-tutorial angular-forms rxjs7 typescript4 angular16

angular-animated-list's Introduction

โšก Angular Animated List

  • App using services, routing, interpolation, property & event-binding and Formbuilding to add text items to a list.
  • Note: to open web links in a new window use: ctrl+click on link

GitHub repo size GitHub pull requests GitHub Repo stars GitHub last commit

๐Ÿ“„ Table of contents

๐Ÿ“š General info

  • Routing module allows user to navigate between Home and About pages.
  • Item is added to an existing list of Programming Items.
  • Angular FormBuilder used to create a simple form.
  • RxJS BehaviourSubject used: A Subject that requires an initial value and emits its current value to new subscribers
  • Angular Forms Module: Implements a set of directives and providers to communicate with native DOM elements when building forms to capture user input.

๐Ÿ“ท Screenshots

Example screenshot.

๐Ÿ“ถ Technologies

๐Ÿ’พ Setup

  • 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 npm run build to create an optimzed build file.
  • Run npm run build:github to create an optimised build file and deploy to your Github repo.

๐Ÿ’ป Code Examples

  • Home.Component class from home.component.ts
export class HomeComponent implements OnInit {

  itemCount: number;
  btnText: string = 'Add an item to the list';
  goalText: string = 'Another programming item';
  goals = [];

  constructor(private _data: DataService) { }

  ngOnInit(): void {
    this._data.goal.subscribe(res => this.goals = res);
    this.itemCount = this.goals.length;
    this._data.changeGoal(this.goals);
  }

  addItem(): void {
    this.goals.push(this.goalText);
    this.goalText = '';
    this.itemCount = this.goals.length;
    this._data.changeGoal(this.goals);
  }

  removeItem(i: number): void {
    this.goals.splice(i, 1);
    this._data.changeGoal(this.goals);
  }
}

๐Ÿ†’ Features

  • Angular animations library used to make data entry more interesting.

๐Ÿ“‹ Status & To-Do List

  • Status: Working.
  • To-Do: Nothing

๐Ÿ‘ Inspiration

๐Ÿ“ License

  • This project is licensed under the terms of the MIT license.

โœ‰๏ธ Contact

angular-animated-list's People

Contributors

andrewjbateman avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.