Posts

Showing posts from January, 2023

Angular Tutorial part 3 - Directive and Custom Directive

Image
Angular directives are one of the core features of the Angular framework. They allow developers to extend the HTML language with new elements and attributes that can be used to manipulate the Document Object Model (DOM). Directives can be used to add custom behavior to an HTML element, such as adding new styling, handling events, or changing the structure of the page. There are several types of directives in Angular, including structural directives and attribute directives. Structural directives are used to manipulate the structure of the DOM, such as adding or removing elements from the page. Attribute directives are used to manipulate the appearance or behavior of an HTML element. One of the most powerful features of Angular is the ability to create custom directives. Custom directives allow developers to create their own elements and attributes that can be used in an Angular application. Custom directives are typically used to encapsulate complex logic or behavior, such as adding a...

Angular tutorial part 2 - TODO APP

Image
Building a to-do app with Angular is a great way to learn the basics of the framework and get a feel for how it works. In this article, we'll walk through the process of building a simple to-do app using Angular and explain the key concepts and features that we'll be using along the way. The first step in building a to-do app with Angular is to set up the basic project structure. Angular uses a modular architecture, which means that the app is divided into a series of modules. Each module is a group of related components and services that work together to accomplish a specific task. For our to-do app, we'll start by creating a new module called "TodoModule". This module will contain all of the components and services that we'll need for our app. Next, we'll create the components that make up our to-do app. A component in Angular is a class that controls a specific section of the app's user interface. For our app, we'll create a "TodoListCompo...

Angular tutorial part 1 - COMPONENTS, MODULES, SERVICES

Image
Angular is a powerful JavaScript framework for building web applications. One of the key features of Angular is its use of components, modules, and services. In this article, we will explore each of these concepts in more detail and discuss how they are used in an Angular application. Components are the building blocks of an Angular application. They are used to define the visual and functional parts of the application, such as buttons, forms, and other user interface elements. Components are reusable, which means they can be used multiple times throughout the application. They are also self-contained, meaning they have their own template, styles, and logic. Modules are used to organize the different parts of an Angular application. They are used to group related components, services, and other code together. This helps to keep the codebase organized and easy to maintain. Modules can also be used to import other modules, which allows for easy sharing of code between different parts of...