Skip to content

Commit 152d2b3

Browse files
committed
chore: Update Angular framework description in README.md
1 parent 5fdaed1 commit 152d2b3

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

README.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -614,17 +614,15 @@ export class AppComponent {
614614

615615
## Scope
616616

617-
The scope of a variable in Angular refers to the context in which the variable is defined and can be accessed. There are three main types of scope in Angular:
617+
In Angular, the scope of a variable determines where it can be accessed:
618618

619-
- **Global Scope** - Variables defined in the global scope are accessible from anywhere in the application. They are defined outside of any function or block of code.
620-
621-
- **Local Scope** - Variables defined in a function or block of code are accessible only within that function or block. They are not accessible outside of the function or block.
622-
623-
- **Component Scope** - Variables defined in an Angular component are accessible within that component and its child components. They are not accessible outside of the component.
619+
- **Global Scope**: Accessible anywhere in the application.
620+
- **Local Scope**: Accessible only within a specific function or block.
621+
- **Component Scope**: Accessible within a component and its child components.
624622

625623
### Global Scope
626624

627-
Variables defined in the global scope are accessible from anywhere in the application. They are defined outside of any function or block of code.
625+
Accessible from anywhere in the application; defined outside any function or block.
628626

629627
Example :
630628

@@ -665,7 +663,7 @@ export class AppComponent {
665663

666664
### Local Scope
667665

668-
Variables defined in a function or block of code are accessible only within that function or block. They are not accessible outside of the function or block.
666+
Accessible only within the function or block where defined.
669667

670668
Example :
671669

@@ -707,7 +705,7 @@ export class AppComponent {
707705

708706
### Component Scope
709707

710-
Variables defined in an Angular component are accessible within that component and its child components. They are not accessible outside of the component.
708+
Accessible within the component and its children.
711709

712710
Example :
713711

@@ -735,11 +733,11 @@ export class AppComponent {
735733

736734
## View Encapsulation
737735

738-
View Encapsulation is a feature of Angular that allows you to control how styles are applied to components. By default, Angular uses Emulated View Encapsulation, which means that styles are scoped to the component and do not affect other components.
736+
Controls how styles are applied to components. By default, Angular uses Emulated View Encapsulation, scoping styles to the component.
739737

740738
### Emulated View Encapsulation
741739

742-
Emulated View Encapsulation is the default mode in Angular. In this mode, Angular emulates the shadow DOM to apply styles to components. This means that styles are scoped to the component and do not affect other components.
740+
Default mode in Angular, emulating shadow DOM to scope styles to the component.
743741

744742
```typescript
745743
import { Component, ViewEncapsulation } from '@angular/core';
@@ -757,7 +755,7 @@ export class AppComponent {
757755

758756
### Shadow DOM View Encapsulation
759757

760-
Shadow DOM View Encapsulation uses the native shadow DOM to apply styles to components. This means that styles are encapsulated within the shadow DOM and do not affect other components.
758+
Uses native shadow DOM to encapsulate styles within the component, preventing them from affecting other components.
761759

762760
```typescript
763761
import { Component, ViewEncapsulation } from '@angular/core';
@@ -775,7 +773,7 @@ export class AppComponent {
775773

776774
### None View Encapsulation
777775

778-
None View Encapsulation disables view encapsulation for the component. This means that styles are not scoped to the component and can affect other components.
776+
Disables encapsulation; styles can affect other components.
779777

780778
```typescript
781779
import { Component, ViewEncapsulation } from '@angular/core';
@@ -795,7 +793,7 @@ export class AppComponent {
795793

796794
## Component Communication
797795

798-
Component communication is the process of passing data between components in an Angular application. There are several ways to achieve component communication in Angular, including Input and Output decorators, EventEmitter, and services.
796+
Passing data between Angular components using Input/Output decorators, EventEmitter, and services.
799797

800798
### Parent to Child
801799

0 commit comments

Comments
 (0)