This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @import 'node_modules/bootstrap/scss/bootstrap.scss'; | |
| @import '../node_modules/font-awesome/css/font-awesome.css'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="row"> | |
| <div class="col-md-2"> | |
| </div> | |
| <div class="col-md-8"> | |
| </div> | |
| <div class="col-md-2"> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ToDo { | |
| _id:string; | |
| title: string; | |
| description: string; | |
| date: Date; | |
| status: string; | |
| } | |
| export default ToDo; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ToDo from '../models/todo.model'; | |
| import { Observable } from 'rxjs/Rx'; | |
| import { HttpClient, HttpErrorResponse } from '@angular/common/http'; | |
| import {Response} from '@angular/http'; | |
| import { Injectable } from '@angular/core'; | |
| @Injectable() | |
| export class TodoService { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { FormsModule } from '@angular/forms'; | |
| import { HttpClient, HttpClientModule } from '@angular/common/http'; | |
| import { TodoService } from './services/todo.service'; | |
| import { BrowserModule } from '@angular/platform-browser'; | |
| import { NgModule } from '@angular/core'; | |
| import { AppComponent } from './app.component'; | |
| import {NgbModule} from '@ng-bootstrap/ng-bootstrap'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { FormsModule } from '@angular/forms'; | |
| import { HttpClient, HttpClientModule } from '@angular/common/http'; | |
| import { BrowserModule } from '@angular/platform-browser'; | |
| import { NgModule } from '@angular/core'; | |
| import { AppComponent } from './app.component'; | |
| import {NgbModule} from '@ng-bootstrap/ng-bootstrap'; | |
| @NgModule({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ToDo from '../models/todo.model'; | |
| import { Observable } from 'rxjs/Rx'; | |
| import { HttpClient, HttpErrorResponse } from '@angular/common/http'; | |
| import {Response} from '@angular/http'; | |
| import { Injectable } from '@angular/core'; | |
| //RxJS operator for mapping the observable | |
| import 'rxjs/add/operator/map'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ToDo { | |
| _id:string; | |
| title: string; | |
| description: string; | |
| date: Date; | |
| status: string; | |
| constructor( | |
| ){ | |
| this.title = "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Response } from '@angular/http'; | |
| import { TodoService } from './services/todo.service'; | |
| import ToDo from './models/todo.model'; | |
| import { Component, OnInit } from '@angular/core'; | |
| @Component({ | |
| selector: 'app-root', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.scss'] | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="row"> | |
| <div class="col-md-2"></div> | |
| <div class="col-md-8"> | |
| <div class="todos" *ngIf="todosList"> | |
| <table class="table"> | |
| <thead class="h"> | |
| <tr class="h"> | |
| <th class="h">Title</th> | |
| <th class="h">Description</th> |