Posts

AngularJS Components

Image
    Learn Components in AngularJS-14 The main purpose of Angular Component is to generate a part of web page called view, with the help of template. In this tutorial, you will learn how to work with component and template. Create a component: Create Component from CLI create two components   C: \ >ng4app> ng g c components/user  ng angular command  g ( generate)  c (component)   Result: The output is as show below − CREATE src/app/user/user.component.html (28 bytes) CREATE src/app/user/user.component.spec.ts (671 bytes) CREATE src/app/user/user.component.ts (296 bytes) CREATE src/app/user/user.component.css (0 bytes) UPDATE src/app/app.module.ts (431 bytes)   Here, UserComponent is created under src/app/user folder. Component class, Template and stylesheet are created. AppModule is updated with new component.         // src/app/user.component.ts   import { Component, OnInit } from '@angular/core' ; ...

AngularJS14 Project Structure

Image
    Understand Project Structure First Open up the project, then you will the following files. tsconfig.json --  which contains the all the settings of typescript tsconfig.app.json -- app related settings(what ts files used and where they saved etc.) tsconfig.spec.json ---project test related information package.json   --- shows a list of dependencies they are nothing but the modules that are used in project along with their versions etc. karma.json --- related to karma configuration angular.json -- related to CLI  style.css is a global CSS file. Whereas an app.component.css is local. Just for now, rest we can ignore... src -- is a folder which contains all the source code of project. It contains components modules, tiles etc. It includes environment related files. main.ts   is a startup file. It contains some imports of core libraries. app.module.ts (just it is a class normally).   test.cs -------contains test information. browser.ts -----conta...

AngularJS-14 Introduction

Image
 AngularJS Tutorial for Beginners   This Angular 14 tutorial will be covering the latest version of the Angular framework and look at all the fundamentals, including the following topics.     Angular CLI     Components,     Module     Services     Datatype     Data binding     Arrays     Functions     Directives     Events     Forms     HTTP     Routing Introduction Angular is a platform and framework for building single-page client applications using HTML and TypeScript. Angular is written in Typescript. It uses full features of Typescript decorators, types, and other high level concepts of it. Angular is a component-based framework for building scalable web applications in an enterprise business world, It includes routing, forms, management client-server communications and more....