Skip to content

Instantly share code, notes, and snippets.

View desoga10's full-sized avatar
💥
Aiming for the stars

deji adesoga desoga10

💥
Aiming for the stars
View GitHub Profile
@desoga10
desoga10 / sharedmodule.ts
Last active April 2, 2019 08:19
Just some angular module
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CommonModule } from '@angular/common';
import { MaterialModule } from '../material.module';
import { NavbarComponent } from './navbar/navbar.component';
import { FormsModule } from '@angular/forms';
import { FooterComponent } from './footer/footer.component';
@NgModule({
declarations: [NavbarComponent, FooterComponent],
@desoga10
desoga10 / index.html
Last active April 7, 2019 19:24
The Navbar Section Created
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous"/>
@desoga10
desoga10 / index.html
Created April 8, 2019 13:55
Form group
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous" />
@desoga10
desoga10 / index.html
Created April 8, 2019 14:05
Data table
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous" />
@desoga10
desoga10 / app.js
Last active April 9, 2019 00:59
Display Data into The Console
//Player Register Class
class Player {
constructor(firstname, lastname, residence, position, country, jerseynumber) {
this.firstname = firstname;
this.lastname = lastname;
this.residence = residence;
this.position = position;
this.country = country;
this.jerseynumber = jerseynumber;
@desoga10
desoga10 / app.js
Created April 9, 2019 10:20
Different Methods
//User Interface Class
class Interface {
static dispalyPlayers() {
const RegisteredPlayers = Register.getPlayers();
const players = RegisteredPlayers;
players.forEach(player => UI.addPlayers(player));
}
@desoga10
desoga10 / app.js
Created April 9, 2019 12:08
Add data to table
//Add Player To Table
document.querySelector('#player-form').addEventListener('submit', e => {
//Prevent Default Submission
e.preventDefault();
//Get The Values of The Form
const firstname = document.querySelector('#firstname').value;
const lastname = document.querySelector('#lastname').value;
const residence = document.querySelector('#residence').value;
static deletePlayer(el) {
if (el.classList.contains('delete')) {
el.parentElement.parentElement.remove();
}
}
@desoga10
desoga10 / app.js
Created April 9, 2019 20:08
Remove Player Data
document.querySelector('#playerlist').addEventListener('click', e => {
//Remove Player data from the table
Interface.deletePlayer(e.target);
});
//Clear Form Field
Interface.clearFormField();