@ -412,14 +412,16 @@ Open the `Index.cshtml` file in the `Pages` folder of the *TodoApp.Web* project
< / abp-card-header >
< / abp-card-header >
< abp-card-body >
< abp-card-body >
<!-- FORM FOR NEW TODO ITEMS -->
<!-- FORM FOR NEW TODO ITEMS -->
< form id = "NewItemForm" class = "form-inline" >
< form id = "NewItemForm" class = "row row-cols-lg-auto g-3 align-items-center" >
< input id = "NewItemText"
< div class = "col-12" >
type="text"
< div class = "input-group" >
class="form-control mr-2"
< input id = "NewItemText" type = "text" class = "form-control" placeholder = "enter text..." >
placeholder="enter text...">
< / div >
< button type = "submit" class = "btn btn-primary" > Submit< / button >
< / div >
< div class = "col-12" >
< button type = "submit" class = "btn btn-primary" > Submit< / button >
< / div >
< / form >
< / form >
<!-- TODO ITEMS LIST -->
<!-- TODO ITEMS LIST -->
< ul id = "TodoList" >
< ul id = "TodoList" >
@foreach (var todoItem in Model.TodoItems)
@foreach (var todoItem in Model.TodoItems)
@ -543,7 +545,7 @@ namespace TodoApp.Blazor.Pages
private List< TodoItemDto > TodoItems { get; set; } = new List< TodoItemDto > ();
private List< TodoItemDto > TodoItems { get; set; } = new List< TodoItemDto > ();
private string NewTodoText { get; set; }
private string NewTodoText { get; set; }
protected async override Task OnInitializedAsync()
protected override async Task OnInitializedAsync()
{
{
TodoItems = await TodoAppService.GetListAsync();
TodoItems = await TodoAppService.GetListAsync();
}
}
@ -589,17 +591,16 @@ Open the `Index.razor` file in the `Pages` folder of the *TodoApp.Blazor* projec
< / CardHeader >
< / CardHeader >
< CardBody >
< CardBody >
<!-- FORM FOR NEW TODO ITEMS -->
<!-- FORM FOR NEW TODO ITEMS -->
< form id = "NewItemForm"
< form id = "NewItemForm" @onsubmit:preventDefault @onsubmit ="() = > Create()" class="row row-cols-lg-auto g-3 align-items-center">
@onsubmit:preventDefault
< div class = "col-12" >
@onsubmit ="() => Create()"
< div class = "input-group" >
class="form-inline">
< input name = "NewTodoText" type = "text" @bind -value = "@NewTodoText" class = "form-control" placeholder = "enter text..." />
< input type = "text"
< / div >
@bind -value="@NewTodoText"
< / div >
class="form-control mr-2"
< div class = "col-12" >
placeholder="enter text...">
< button type = "submit" class = "btn btn-primary" > Submit< / button >
< button type = "submit" class = "btn btn-primary" > Submit< / button >
< / div >
< / form >
< / form >
<!-- TODO ITEMS LIST -->
<!-- TODO ITEMS LIST -->
< ul id = "TodoList" >
< ul id = "TodoList" >
@foreach (var todoItem in TodoItems)
@foreach (var todoItem in TodoItems)
@ -682,7 +683,7 @@ You first need to run the `TodoApp.HttpApi.Host` project since the proxy generat
Once you run the `TodoApp.HttpApi.Host` project, open a command-line terminal in the `angular` folder and type the following command:
Once you run the `TodoApp.HttpApi.Host` project, open a command-line terminal in the `angular` folder and type the following command:
````bash
````bash
abp generate-proxy
abp generate-proxy -t ng
````
````
If everything goes well, it should generate an output like shown below:
If everything goes well, it should generate an output like shown below:
@ -758,17 +759,16 @@ Open the `/angular/src/app/home/home.component.html` file and replace its conten
< / div >
< / div >
< div class = "card-body" >
< div class = "card-body" >
<!-- FORM FOR NEW TODO ITEMS -->
<!-- FORM FOR NEW TODO ITEMS -->
< form class = "form-inline " ( ngSubmit ) = " create ( ) " >
< form class = "row row-cols-lg-auto g-3 align-items-center " ( ngSubmit ) = " create ( ) " >
< input
< div class = "col-12" >
name="NewTodoText"
< div class = "input-group" >
type= "text"
< input name = "NewTodoText" type = "text" [ ( ngModel ) ] = " newTodoText " class = "form-control" placeholder = "enter text..." / >
[(ngModel)]="newTodoText"
< / div >
class="form-control mr-2"
< / div >
placeholder="enter text..."
< div class = "col-12" >
/ >
< button type = "submit" class = "btn btn-primary" > Submit< / button >
< button type = "submit" class = "btn btn-primary" > Submit< / button >
< / div >
< / form >
< / form >
<!-- TODO ITEMS LIST -->
<!-- TODO ITEMS LIST -->
< ul id = "TodoList" >
< ul id = "TodoList" >
< li * ngFor = "let todoItem of todoItems" >
< li * ngFor = "let todoItem of todoItems" >