Clara  Gutmann

Clara Gutmann

1599651120

Angular Table: Angular 9 Smart Table Example Tutorial

Angular Smart table is a module to easily display data in a table with a set of inbuilt features such as filtering, sorting, etc. in a declarative way. The smart table in Angular has the following focus points:

lightweight:

The smart-table is less than 4kb minified and has no dependencies other than Angular itself. And you can even reduce its size with a custom build if you are not interested in some of the plugins.

robust:

The smart-table is widely tested, which makes the module stable modular and extensible: The core features can be accessed with the controller API, which is created by the top-level Directive. Then a set of directives (plugins) allows you to compose your table behavior in a declarative way.

#angular #angular table

What is GEEK

Buddha Community

Angular Table: Angular 9 Smart Table Example Tutorial
Clara  Gutmann

Clara Gutmann

1599651120

Angular Table: Angular 9 Smart Table Example Tutorial

Angular Smart table is a module to easily display data in a table with a set of inbuilt features such as filtering, sorting, etc. in a declarative way. The smart table in Angular has the following focus points:

lightweight:

The smart-table is less than 4kb minified and has no dependencies other than Angular itself. And you can even reduce its size with a custom build if you are not interested in some of the plugins.

robust:

The smart-table is widely tested, which makes the module stable modular and extensible: The core features can be accessed with the controller API, which is created by the top-level Directive. Then a set of directives (plugins) allows you to compose your table behavior in a declarative way.

#angular #angular table

Christa  Stehr

Christa Stehr

1598940617

Install Angular - Angular Environment Setup Process

Angular is a TypeScript based framework that works in synchronization with HTML, CSS, and JavaScript. To work with angular, domain knowledge of these 3 is required.

  1. Installing Node.js and npm
  2. Installing Angular CLI
  3. Creating workspace
  4. Deploying your First App

In this article, you will get to know about the Angular Environment setup process. After reading this article, you will be able to install, setup, create, and launch your own application in Angular. So let’s start!!!

Angular environment setup

Install Angular in Easy Steps

For Installing Angular on your Machine, there are 2 prerequisites:

  • Node.js
  • npm Package Manager
Node.js

First you need to have Node.js installed as Angular require current, active LTS or maintenance LTS version of Node.js

Download and Install Node.js version suitable for your machine’s operating system.

Npm Package Manager

Angular, Angular CLI and Angular applications are dependent on npm packages. By installing Node.js, you have automatically installed the npm Package manager which will be the base for installing angular in your system. To check the presence of npm client and Angular version check of npm client, run this command:

  1. npm -v

Installing Angular CLI

  • Open Terminal/Command Prompt
  • To install Angular CLI, run the below command:
  1. npm install -g @angular/cli

installing angular CLI

· After executing the command, Angular CLI will get installed within some time. You can check it using the following command

  1. ng --version

Workspace Creation

Now as your Angular CLI is installed, you need to create a workspace to work upon your application. Methods for it are:

  • Using CLI
  • Using Visual Studio Code
1. Using CLI

To create a workspace:

  • Navigate to the desired directory where you want to create your workspace using cd command in the Terminal/Command prompt
  • Then in the directory write this command on your terminal and provide the name of the app which you want to create. In my case I have mentioned DataFlair:
  1. Ng new YourAppName

create angular workspace

  • After running this command, it will prompt you to select from various options about the CSS and other functionalities.

angular CSS options

  • To leave everything to default, simply press the Enter or the Return key.

angular setup

#angular tutorials #angular cli install #angular environment setup #angular version check #download angular #install angular #install angular cli

I am Developer

1610191977

Angular 11 Google Social Login Example Tutorial

Angular 9/10/11 social login with google using angularx-social-login library example. In this tutorial, i will show you step by step on how to implement google social login in angular 11 app.

And also, this tutorial will show you How to login into Angular 10/11 application with google using angularx-social-login library in angular 11 app.

Google Login Integration In Angular 11 App

  • Step 1 - Create New Angular App
  • Step 2 - Install Social Login Library
  • Step 3 - Add Code on App.Module.ts File
  • Step 4 - Add Code on View File
  • Step 5 - Add Code On App.Component ts File
  • Step 6 - Start the Angular Google Login App

https://www.tutsmake.com/angular-11-google-social-login-example/

#angular 11 google login #angular 11 social-login example #login with google button angular 8/9/10/11 #angular 10/11 login with google #angular 10 social google login #angular social login google

Dynamic Mat Table Angular Library

Angular Material is one of the nice set of material components powered by Google and largely compatible with Angular. Mat-Table component is one of the frequently used components to display data in a tabular format. But, in my opinion, the simplicity is kind of lost on it. Hence, I have tried to create a simple library where you will be able to take advantage of all the features of mat table, extending it to new heights, excluding its complexity of configuration.

Live Demo Here

Note: Please have a look at the package.json if the library is not working for you somehow.

CSS Problems? make sure to include the default themes for angular, you can try: _Include _@import** “~@angular/material_/prebuilt-themes/indigo-pink.css” _**in main styles.css.

You can install the dmat-table library from here:

npm install dmat-table

dmat-table

Dynamic Material table for Angular

www.npmjs.com

And you can download the sample Angular application which uses this library :

bavaleakash/dmat-table-test

Demo Project which uses dmat-table library

github.com

Now that we have everything setup, lets start:


The configuration object for this table is defined as below:

Image for post

Configuration Object

This may look intimidating at first but is actually a simple object which will simplify our work.

  1. Table Creation

Image for post

dmat-table First Look

After installing the library you can quickly create the table using below keys:

headers: Actual names of the table headers.

keys: Corresponding keys of the headers defined.

metadata.tableHeading: Table header

Image for post

Include Table app.component.html

Image for post

Simplest Configuration app.component.ts

showTable property is used to simulate a async call and display a loader before the table appears. **_updateTable _**is an important flag which can be toggled as and when the data for the table changes.

Image for post

Getting Data app.component.ts

getTableData() gets the data and displays the data in the table, thereby simulating an async call. Here, we also toggle the **_updateFlag _**which will help our data to be reflected in the table as soon as it changes.

**Bonus: **You may have noticed how I get the data in the service from the ts file instead of a JSON file. The reason behind it is that when using json files in the angular library it will simply ignore them in the production build as it considers them as asset files and Angular ignores the asset files in the libraries by default, hence the workaround. Now I use this as a new normal regardless of the project type.

Image for post

app.service.ts

Image for post

#angular-elements #angular-9 #angular #angular-material #table

Clara  Gutmann

Clara Gutmann

1599459851

Angular Sass: How To Use Sass In Angular 9 Tutorial

Angular supports Sass, CSS, and Less to style global application styles as well as component styles. Angular components styles have an effective CSS encapsulation mechanism that assures any component CSS is local to the component and does not globally alter any styles.

Angular Sass Example

Why use Angular Sass? Well!! Sass (Syntactically Awesome Style Sheets) is an extension of CSS that allows you to use things like variables, nested rules, inline imports, and more. It also supports you to keep things organized and enables you to create style sheets faster.

In short,  Sass is a CSS preprocessor, which combines unique features such as variables, nested rules, and mixins (sometimes referred to as syntactic sugar) into regular CSS. The main object of Sass is to make the CSS coding process more comfortable and more efficient.

Sass is compatible with all versions of CSS. When working with the Angular CLI, the default stylesheets have the .css extension. We are using Angular CLI 8. So, if you have not used previously, then please upgrade your  CLI version. We will use the Bootstrap 4 Framework for this demo and see how we can configure the Sass in our Angular 9 application.

#angular #angular 9 #angular cli #css #angular sass