Git Product home page Git Product logo

basis-angular-tuto's Introduction

basis-angular-tuto

Links

Project Set-Up

  • To create a new workspace and initial starter app, run :
ng new my-app
  • Run the Development Server : Navigate to the workspace folder, such as my-app &&
ng serve -o

Main technologies, Keywords

TypeScript, JSON Server, Angular 10+, Angular Material, Bulma css

User Interface (UI)

  • home page
  • todos page
  • products page
  • employees page
  • about page

Features

  • πŸ““ Todos Management.
  • 🏬 Products Management.
  • πŸ‘₯ Employees Management.

Some steps to remember

  • Make five components by typing the following command :
ng g c home
// ng g c todos
// ng g c products
// ng g c employees
ng g c about
ng g c register
ng g c login 
ng g c layout/header
ng g c layout/footer
  • create a xxxModule with routing in the xxx folder and register it with the root AppModule.
// --module=app	=> Tells ng generate to register it in the imports array of the AppModule.
// --flat => Puts the file in src/app instead of its own directory
//   
ng g m xxx/xxx --module=app --flat --routing
 

// For example: 
ng generate module posts/posts --module app --flat --routing

// Then
ng g c posts/post-detail
ng g c posts/post-list
ng g c posts/add-post
ng g c posts/edit-post

// Then,
 ng generate interface posts/post
 
// Then, create
ng generate service posts/post

// Then create inside the posts folder
post.model.ts



ng g s services/authentication --skip-tests


ng generate interface users/user --skip-tests 

ng g c users/user-profile --skip-tests 

$ ng g c components/confirmation-dialog/confirmation-dialog --module=app --flat 
$ ng g i components/confirmation-dialog/confirmation-dialog 
$ ng g s components/confirmation-dialog/confirmation-dialog   
ng g m angular-components/angular-components --module app --flat --routing
ng g c angular-components/index

//---------------------
ng g c --standalone components/counter
ng g c --standalone components/view-child


@NgModule({
  ... 
  imports: [CounterComponent],  // <----------------- Using standalone components in NgModule-based applications
})
//--------------------- 
ng g c --standalone components/alert
ng g s components/alert

@NgModule({
  ... 
  imports: [AlertComponent],  // <----------------- Using standalone components in NgModule-based applications
})

Notes

  • Most applications should implement a routing module for consistency. It keeps the code clean when configuration becomes complex.

Unit Testing

  • How to write and run tests in Angular using Jasmine & Karma.
  • How to write tests for : Classes, Components, Pipes & Directives
  • How to write tests to test the Router.
  • How to write tests using mocks and spies.
  • How to write tests that involve an asynchronous action.
  • How to write tests that involve the Http service.
  • How to write tests that involve model-driven forms (template-driven forms require E2E testing).
  • How to use the Angular Test Bed to help test behaviours that depend on the Angular framework.

Legal

This is a free and open source app. Want to say thanks? Click the ⭐ at the top of the page. πŸ˜‰

basis-angular-tuto's People

Contributors

abbassizied avatar

Watchers

 avatar

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.