Giter Site home page Giter Site logo

simple-chat's People

Contributors

amoldskred avatar ashenv avatar ccredo avatar clarenced avatar gwenyale avatar mbrandau avatar melkypie avatar pablo0910 avatar priyankagithub7 avatar pszczolas avatar samsambabadi avatar techpool avatar

Watchers

 avatar  avatar

simple-chat's Issues

Style StartComponent

Wrap the content in a Bootstrap card and place it in the center of the page.
On small devices, the card should be full width and without a border-radius.

Add Bootstrap classes to style the form

Create a ChatComponent

Use ng g c chat/chat to create the component in a chat folder.
The component should contain all messages that are sent. Messages by the current user should be on the right side and those from other users on the left. Both of them should be in boxes. Join and leave messages should be centered.

Create a message model with a type (string) and a data (any) value. The component should have an array containing all those messages.

Add a SocketService to the frontend

Generate a new service using ng g s Socket and install socket.io-client using npm i --save socket.io-client. Then include socket.io in the service using import * as io from 'socket.io-client';

Add username validation

A username should only consist of alphanumeric characters and should have a minimum length of 4.

If the username is valid, the server should emit a login event to the socket with the value true.
If it's invalid the login event should have the value false.

Make the form in StartComponent an Angular Form

Use the Template Driven approach. The submit but should be disabled until the form is valid. The username field is required and as a minimum length of 4 while consisting only of alphanumeric characters.

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.