This commit is contained in:
eli labourne de torres 2021-05-08 21:53:06 +08:00
parent 7a155b63a2
commit 3541a10a9b
3 changed files with 31 additions and 9 deletions

View File

@ -1,10 +1,12 @@
import { HttpClient, HttpHeaders, HttpResponse} from "@angular/common/http";
import { HttpClient, HttpHeaders } from "@angular/common/http";
import { Injectable } from "@angular/core";
import { Observable } from "rxjs";
import { Tasks } from "../models/todo-interface";
import { map } from "rxjs/operators";
import { Tasks } from "../models/todo-interface";
const URL = '/tasks';
@Injectable()
@Injectable({
providedIn: 'root'
})
export class TodoService{
constructor(private http: HttpClient){}

View File

@ -1,13 +1,12 @@
import { BrowserModule } from '@angular/platform-browser';
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AutofocusModule } from 'angular-autofocus-fix';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
import { AppComponent } from './app.component';
import { TodoList } from './Todo-List-App/containers/TodoList/Todo-list.component';
import { TodoService } from './Todo-List-App/services/todo.service';
import { HttpClientModule } from '@angular/common/http';
import { TodoEmptyComponent } from './Todo-List-App/components/todo-empty/todo-empty.component';
import { TodoList } from './Todo-List-App/containers/TodoList/todo-list.component';
@NgModule({
declarations: [
@ -22,7 +21,10 @@ import { TodoEmptyComponent } from './Todo-List-App/components/todo-empty/todo-e
BrowserAnimationsModule,
HttpClientModule
],
providers: [TodoService],
exports: [AppComponent,
TodoList,
TodoEmptyComponent],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }

18
web.config Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add accessType="Allow" users="*" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>