Code Monkey home page Code Monkey logo

krunallathiya / angular6crudtutorial Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 36.0 106 KB

In this tutorial, I will teach you Angular 6 CRUD Example. I will use Angular, MongoDB, Node.js, and Express.js for this project, so this project is also called MEAN Stack web application. We make a simple Angular CRUD web tutorial, which can create, read, update and delete ad units.

Home Page: https://appdividend.com/2018/05/27/angular-6-crud-example-mean-stack-tutorial/

JavaScript 21.79% TypeScript 58.38% HTML 19.33% CSS 0.50%

angular6crudtutorial's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular6crudtutorial's Issues

Search ?

Search ?Have you implemented the search? have any projects with pagination search?

Error Adding new, updating, or deleting an item.

The following code doesn't work:

  addAdUnit(unit_name, unit_price) {
    const obj = {
      unit_name: unit_name,
      unit_price: unit_price
    };
    this.http.post(`${this.uri}/add`, obj)
        .subscribe(res => console.log('Done'));
  }

Despite changed:

this.http.post(${this.uri}/add, obj)
to
this.http.post(${this.uri}/create, obj)

Get console error:

HttpErrorResponse {headers: HttpHeaders, status: 404, statusText: "OK", url: "https://example.com/api/adunit/create", ok: false, …}

Here I am using https not http.

I checked other crud methods, and got the same error for POST, PUT, and DELETE.

GET is working without issues.

Using ngModel input property and ngModelChange event with reactive form directives has been deprecated.

I get the following console error which happens for editing (GET/id) when using a url as next: "https://example.com/api/adunit/edit/1",
The Edit form loads but nothing is displayed in the inputs.

Here is the pointed code in Edit template:
:
<input type="text" class="form-control" name="unit_name" formControlName="unit_name" #unit_name [(ngModel)] = "adunit.unit_name"/>

The console error message is:

It looks like you're using ngModel on the same form field as formControlName.
Support for using the ngModel input property and ngModelChange event with
reactive form directives has been deprecated in Angular v6 and will be removed
in Angular v7.

For more information on this, see our API docs here:
https://angular.io/api/forms/FormControlName#use-with-ngmodel

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.