Skip to main content

Posts

Showing posts with the label Angular

Angular Fundamentals:

Interpolation : Pass data from component file to template called interpolation,We can pass variable & function to the template files like below, import { Component, OnInit } from '@angular/core'; @Component({   selector: 'app-topmenu',   template: ` {{name}} {{getsirname()}} `,   styles: [] }) export class TopmenuComponent implements OnInit {   public name = "Dharmendra Singh";   constructor() { }   ngOnInit() {   }   getsirname(){ return "rajput"; }} Pipes : Pipes are used to change the data before display on the view, like uppercase.lowecase,slice etc. selector: 'app-topmenu',   template: ` {{name | uppercase}}  {{name | lowercase}}  {{ post | json }}  //  ... `,   styles: [] ng foor loop in angular with add class dynamic on last element  < span *ngFor = "let two of last_two; let last = last;" > < div class = "single-to...

Angular Introduction

Start Angular Application: There are two types of angular , Angular Js & Angular CLI, We are going to dive in to the Angular CLI: Welcome to Angular! Angular helps you build modern applications for the web, mobile, or desktop. Before you begin, make sure your development environment includes  Node.js ®  and an npm package manager. 1 -  Node.js :  Angular requires  Node.js  version 8.x or 10.x.             To check your node js version use node -v 2 -   npm package manager :  Angular, the Angular CLI, and Angular apps depend on features and functionality provided by libraries that are available as  npm packages Install The latest Version of the Node as well as npm: sudo apt-get install curl python-software-properties curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash - sudo apt-get install nodejs Step 1: Install the Angular CLI:  Install the Angular CLI globally. npm i...