https://www.tektutorialshub.com/angular-tutorial/#introduction-to-angular
What is Angular
Angular는
모바일 및 데스크탑용 Single Page Application을 구축하기 위한 개발 플랫폼입니다.
Typescript 및 HTML을 사용하여 앱을 빌드합니다.
Angular 자체는 Typescript를 사용하여 작성되었습니다.
이제 복잡하고 정교한 웹 또는 모바일 애플리케이션을 구축하는 데
필요한 모든 기능이 함께 제공됩니다.
component , Directives , Forms , Pipes , HTTP Services , Dependency Injection
등과 같은 기능이 함께 제공됩니다
Angular Versions
Angular의 초기 버전은 Angular 2로 이름이 지정되었습니다.
나중에 Angular로 이름이 변경되었습니다 .
그런 다음 Angular 팀은 Angular 버전의 새 버전을 정기적으로 릴리스하고
Angular 10.0.12에서 사용할 수 있는 마지막 안정 버전을 출시합니다.
Angular 9는 2020년 2월 6일에 출시되었습니다.
Angular 9는 주요 릴리스입니다.
이 릴리스는 기본적으로 ivy 컴파일러 및 런타임으로 전환됩니다.
아이비는 더 작은 번들 크기, 더 빠르고 더 나은 테스트 디버깅, 향상된 유형 검사, 빌드 시간 등을 제공합니다.
Angular 10은 2020년 6월 24일에 출시됩니다. 이 링크 에서 기능 목록에 대해 알아볼 수 있습니다.
Version History
Angular VersionDateDescription
Angular 2 | 14.09.2016 | Initial Version of Angular |
Angular 4 | 23.03.2017 | Version 4 |
Angular 5 | 11.11.2017 | Version 5 |
Angular 6 | 03-05-2018 | Version 6 |
Angular 7 | 18-10-2018 | Version 7 |
Angular 8 | 25-08-2019 | Version 8 |
Angular 9 | 06-02-2020 | Version 9 |
Angular 10 | 24-06-2020 | Version 10 |
Angular 10.0.12 | 24-08-2020 | Version 10.0.12 |
You can read the latest versions at https://github.com/angular/angular/blob/master/CHANGELOG.md
Prerequisites
Angular 튜토리얼은
Javascript, HTML 및 CSS에 대한 실무 지식이 필요합니다 . 또한 OOP의 개념이 필요합니다.
우리는 Typescript 를 언어로 사용할 것입니다.
C# 또는 Java에 대한 지식이 있으면 매우 쉽게 찾을 수 있습니다.
Typescript 튜토리얼 살펴보기
Introduction to Angular
이 Angular 입문서에서는 Angular를 엿볼 수 있습니다.
Angular는 모바일 및 데스크톱 웹 애플리케이션을 구축하기 위한 UI 프레임워크입니다.
Javascript를 사용하여 구축되었습니다.
Angular를 사용하면 HTML, CSS 및 Typescript를 사용하여
놀라운 클라이언트 측 애플리케이션을 구축할 수 있습니다.
Angular 프레임워크를 사용하기 전에 Angular 프레임워크가 어떻게 작동하는지 아는 것이 매우 중요합니다.
다음 자습서 에서는 Angular를 소개 하고 Angulars 아키텍처에 대해 설명합니다 .
Getting Started With Angular Tutorial
Angular는 Angular 2 버전 이후로 많은 변화를 겪었습니다.
Angular 7 버전부터는 Angular에서 새 프로젝트를 설치하고 생성하는 것이 매우 간단해졌습니다.
설치 및 Visual Studio 코드, NPM 패키지 관리자 및 Angular CLI에서 수행해야 하는 유일한 작업입니다.
일단 필요한 종속성을 설치하고 새 프로젝트를 만드는 것은 간단한 명령(ng new)을 실행하는 것만큼 쉽습니다 .
Angular CLI 는 다양한 라이브러리의 구성 및 초기화를 처리합니다.
다음 단계별 자습서는 Angular 응용 프로그램을 만드는 과정을 안내합니다.
Component
Component는 Angular 애플리케이션의 주요 빌딩 블록입니다.
Component는 View에 대한 정의와 View의 모양과 동작을 정의하는 data를 포함합니다.
Angular Components는 자바 스크립트 클래스이며
@component Decorator를 사용하여 정의됩니다.
이 데코레이터는 Component에 표시할 View 및 Class에 관한 Meatdate를 제공합니다.
Component는 Data Binding이라는 프로세스를 사용하여 View에 data를 전달합니다.
이것은 DOM Elements를 component propertie에 바인딩하여 수행됩니다.
바인딩을 사용하여 component class property values을 사용자에게 표시하고,
element style을 변경하고, 사용자 이벤트에 응답할 수 있습니다.
- Angular Components 소개
- Angular의 데이터 바인딩
- Angular의 Interpolation
- Angular의 Property Binding
- Angular의 이벤트 바인딩
- Angular의 양방향 바인딩 및 ngModel
- ngModelChange & Change 이벤트
- Angular에 자식 컴포넌트 추가하기
Directives
Angular directive은 DOM을 조작하는 데 도움이 됩니다 .
지시문을 사용하여 DOM 요소의 모양, 동작 또는 레이아웃을 변경할 수 있습니다.
HTML을 확장하는 데 도움이 됩니다.
Angular 지시문 은 동작 방식에 따라 세 가지 범주로 분류됩니다.
Component, Structural and Attribute Directives 입니다.
ngFor 는Angular structural directive입니다.
반복 가능한 목록(Collection)의 각 항목에 대해 HTML 템플릿의 일부를 한 번씩 반복합니다.
ngSwitch 는 DOM 요소를 추가/제거할 수 있습니다 .
자바스크립트의 switch 문과 유사합니다.
ngIf 는 DOM 요소를 추가/제거할 수 있습니다.
ngClass 지시문 은
Angular Attribute Directive 으로 HTML 요소에 CSS 클래스를 추가하거나 제거할 수 있습니다.
ngStyle 지시문을 사용하면 expression을 사용하여 HTML 요소의 스타일을 수정할 수 있습니다
ngStyle 을 사용하면 HTML 요소의 스타일을 동적으로 변경할 수 있습니다.
Pipes
Angular pipes는 Data를 변환하는 데 사용됩니다.
예를 들어, Date 파이프는 로케일 규칙에 따라 날짜 형식을 지정합니다.
파이프 및 체인 파이프에 인수를 전달할 수 있습니다.
Angular를 사용하면 Custom Pipe를 생성할 수도 있습니다.
- Angular Pipes
- Angular Custom Pipes
- Date Pipe
- Async Pipe
- KeyValue Pipe
- Using Pipes in Components & Services
Component Communication
- Angular Component Communication
- Passing data from Parent to child component
- Passing Data from Child to Parent Component
Component Life Cycle Hook
Life Cycle Hooks는 Angular가 지시문 및 구성 요소를 생성, 변경 및 파괴할 때
directives and components 에 대해 호출하는 메서드입니다.
Life Cycle Hook를 사용하여 생성, 업데이트 및 삭제 중에
component의 동작을 미세 조정할 수 있습니다.
Angular Forms
데이터 입력 양식data entry form은 매우 간단하거나 매우 복잡할 수 있습니다.
양식에는 입력 필드가 없거나 텍스트 상자, 날짜, 숫자, 이메일, 암호, 확인란, 옵션 상자 등과
같은 다양한 필드가 있습니다.
이러한 필드는 여러 탭 또는 여러 페이지에 걸쳐 있을 수 있습니다.
양식에는 여러 필드에 상호 의존적인 복잡한 유효성 검사 논리가 포함될 수도 있습니다.
Angular Forms 모듈은 위의 모든 것과 더 많은 것을 처리하도록 설계되었습니다.
Angular Forms는
이제 Forms 개발에 대한 Reactive Forms 접근 방식을 지원합니다.
템플릿 기반 접근 방식의 이전 방식도 지원됩니다.
- Angular Forms Tutorial: Fundamental & Concepts
- Template Driven Forms in Angular
- Set Value in Template Driven forms in Angular
- Reactive Forms in Angular
- FormBuilder in Reactive Forms
- SetValue & PatchValue in Angular
- StatusChanges in Angular Forms
- ValueChanges in Angular Forms
- FormControl
- FormGroup
- FormArray Example
- Build Dynamic or Nested Forms using FormArray
- SetValue & PatchValue in FormArray
- Select Options Dropdown
Services & Dependency Injection
Services를 통해 재사용 가능한 코드를 생성하고 이를 필요로 하는 모든 구성 요소를 사용할 수 있습니다.
Services는 종속성 주입 시스템dependency injection system을 사용하여
components and other services에 주입할 수 있습니다.
dependencies은 Provider’s metadata를 사용하여 Module에서 선언됩니다.
Angular는 Component Tree와 tree of injector & Providers를 생성합니다.
이것을 계층적 패턴이라고 합니다. hierarchical pattern.
- Services
- Dependency injection
- Injector, @Injectable & @Inject
- Providers
- Injection Token
- Hierarchical Dependency Injection
- Angular Singleton Service
- ProvidedIn root, any & platform
- @Self, @SkipSelf & @Optional Decorators
- @Host Decorator in Angular
- ViewProviders
Angular Forms Validation
One of the common tasks that is performed, while building a form is Validation. The Forms Validation is built into the Angular Forms Module. The Angular provides several Built-in validators out of the box. If those validators do not fit your needs, then you can create your own custom validator.
양식을 작성하는 동안 수행되는 일반적인 작업 중 하나는 유효성 검사입니다.
Forms Validation은 Angular Forms Module에 내장되어 있습니다.
Angular는 몇 가지 기본 제공 유효성 검사기를 즉시 제공합니다.
이러한 유효성 검사기가 요구 사항에 맞지 않으면
고유한 사용자 지정 유효성 검사기를 만들 수 있습니다.
- Validations in Reactive Forms in Angular
- Custom Validator in Reactive Forms
- Passing Parameter to Custom Validator in Reactive Forms
- Inject Service into Custom Validator
- Validation in Template Driven Forms
- Custom Validator in Template Driven Forms
- Angular Async Validator
- Cross Field Validation
- Adding Validators Using SetValidators
HTTP
The newly designed HttpClient Module allows us to query the Remote API source
to get data into our Application.
It requires us to Subscribe to the returned response using RxJs observables.
새로 설계된 HttpClient Module을 사용하면
Remote API source를 쿼리하여 애플리케이션으로 데이터를 가져올 수 있습니다.
RxJ 관찰 가능 항목을 사용하여 the returned response을 구독Subscribe해야 합니다.
- Angular HTTP Client Tutorial
- HTTP GET Example
- HTTP POST Example
- Passing URL Parameters (Query strings)
- HTTP Headers Example
- HTTP Interceptor
Angular Router
The Router module handles the navigation & Routing in Angular.
The Routing allows you to move from one part of the application to another part or one View to another View.
라우터 모듈은 Angular에서 탐색 및 라우팅을 처리합니다.
라우팅을 사용하면 응용 프로그램의 한 부분에서
다른 부분으로 또는 한 보기에서 다른 보기로 이동할 수 있습니다.
- Routing and Navigation in Angular
- Location Strategies in Angular Router
- Passing Parameters to Route
- Child Routes / Nested Routes
- Passing Optional (Query) Parameters to a route
- Navigation between Routes
- Angular Route Guards
- CanActivate Guard
- CanActivateChild Guard
- CanDeactivate Guard
- Angular Resolve Guard
- Angular Pass data to route
- RouterLinkActive
- Router Events
Angular Module
The Angular Modules help us to organize our code into manageable parts or block.
Each block implements a specific feature.
The Components, Templates, Directives, Pipes, and Services,
which implements that feature become part of the module.
The following tutorial explains,
how best you can create an Angular Module,
The folder structure that you can use, etc.
We can also load the Modules lazily or Preload thus improving the performance of the Application.
Angular 모듈은 코드를 관리 가능한 부분이나 블록으로 구성하는 데 도움이 됩니다.
각 블록은 특정 기능을 구현합니다.
해당 기능을 구현하는 Components , Templates, Directives , Pipes 및 Services 는 모듈의 일부가 됩니다.
다음 튜토리얼에서는 Angular 모듈을 가장 잘 만드는 방법, 사용할 수 있는 폴더 구조 등을 설명합니다.
모듈을 지연 로드하거나 미리 로드하여 애플리케이션의 성능을 향상시킬 수도 있습니다.
- Introduction to Angular Modules
- Routing Between Angular Modules
- Angular folder structure: Best Practices
- Lazy Loading in Angular
- Preloading Strategy
- CanLoad Guard
Advanced Components
The Components in Angular are very powerful feature.
The following tutorials take you through some of the important features of the Angular Component.
Angular의 구성 요소는 매우 강력한 기능입니다.
다음 자습서에서는 Angular 구성 요소의 몇 가지 중요한 기능을 안내합니다.
- Ng-Content & Content Projection in Angular
- Angular @input, @output & EventEmitter
- Template Reference Variable in Angular
- ng-container in Angular
- ng-template & TemplateRef in angular
- ngtemplateoutlet in angular
- HostBinding & HostListener
- ViewChild, ViewChildren & QueryList
- ElementRef
- Renderer2
- ContentChild & ContentChildren
- AfterViewInit, AfterViewChecked, AfterContentInit & AfterContentChecked
- Angular Decorators
Observable in Angular
The Angular uses the Observable Pattern extensively.
The following tutorials gives you an introduction to observable and
how to use it in an Angular Application.
Angular는 Observable Pattern을 광범위하게 사용합니다.
다음 튜토리얼에서는 옵저버블에 대한 소개와
Angular 애플리케이션에서 이를 사용하는 방법을 제공합니다.
- Angular Observable Tutorial
- Create Observable from a string, array. object, collection
- Observable from events using fromEvent
- Observable pipe
- Map Operator
- Filter Operator
- Tap Operator
- SwitchMap
- MergeMap
- ConcatMap
- ExhaustMap
- take, takeUntil, takeWhile, takeLast
- First, last & Single
- Skip, SkipWhile, SkipUntil & SkipLast
- Scan & Reduce
- DebounceTime & Debounce
- Delay & DelayWhen
- ThrowError
- CatchError
- ReTry & ReTryWhen
- Unsubscribe from an observable
- Subjects in Angular
- ReplaySubject, BehaviorSubject & AsyncSubject
- Angular Subject Example
Styling the Application
The Angular uses several different ways to style the Application.
You can style the app globally and then override it locally in the component very easily.
The component styles have local scope,
which is achieved using the various View Encapsulation strategies.
Learn all these in the section
Angular는 애플리케이션의 스타일을 지정하기 위해 여러 가지 다른 방법을 사용합니다.
앱의 스타일을 전역적으로 적용한 다음 구성 요소에서 로컬로 매우 쉽게 재정의할 수 있습니다.
구성 요소 스타일에는 다양한 뷰 캡슐화 전략을 사용하여 달성되는 로컬 범위가 있습니다.
섹션에서 이 모든 것을 배우십시오.
- Angular Global Styles
- View Encapsulation
- Style binding in Angular
- Class Binding in Angular
- Component Styles
- How to Install & Use Angular FontAwesome
- How to Add Bootstrap to Angular
Others
Configuration
The apps usually need some sort of Run-time configuration information like URL endpoint etc,
which it needs to load at startup.
Also, different environments like development, production &
testing require different environments, etc.
앱에는 일반적으로 시작 시 로드해야 하는 URL 끝점 등과 같은 일종의 런타임 구성 정보가 필요합니다.
또한 개발, 생산 및 테스트와 같은 다양한 환경에는 다른 환경 등이 필요합니다.
Handling Errors
In the following Angular tutorials, we look at how Angular handles the error.
We handle errors by setting up a Global Error handler or custom error handler.
Also,.whenever the error occurs in an HTTP operation,
the Angular wraps it in an httpErrorResponse Object.
Learn how to handle the HTTP Errors also.
다음 Angular 자습서에서는 Angular가 오류를 처리하는 방법을 살펴봅니다.
글로벌 오류 처리기 또는 사용자 지정 오류 처리기를 설정하여 오류를 처리합니다.
또한 HTTP 작업에서 오류가 발생할 때마다
Angular는 이를 httpErrorResponse Object로 래핑합니다.
HTTP 오류를 처리하는 방법도 배우십시오.
Angular CLI
Learn how to use Angular CLI to speed up the development of Angular Application
Angular CLI를 사용하여 Angular 애플리케이션 개발 속도를 높일수 잇습니다.
SEO & Angular
You Website is useless if it is not found by the Search Engines.
There are many things you must consider to make App SEO friendly.
You need to set up Title & Meta Tags for each page.
Ensure that the search engines can crawl and read your page.
Set the correct Canonical URL for each page etc.
Also, ensure that the app loads quickly, etc.
The Following Angular Tutorials guides you through some of the important SEO features.
귀하의 웹사이트는 검색 엔진에서 찾지 못하면 쓸모가 없습니다.
앱 SEO를 친화적으로 만들기 위해 고려해야 할 사항이 많이 있습니다.
각 페이지에 대한 제목 및 메타 태그를 설정해야 합니다.
검색 엔진이 페이지를 크롤링하고 읽을 수 있는지 확인하십시오.
각 페이지 등에 올바른 표준 URL을 설정하십시오.
또한 앱이 빠르게 로드되는지 확인하십시오.
다음 Angular 자습서는 중요한 SEO 기능 중 일부를 안내합니다.
- Title Service Example
- Dynamic Title based on Route
- Meta Service
- Dynamic Meta Tags
- Canonical URL
- Lazy Load Images in Angular
Angular Universal
The following Angular Universal Tutorial explains
how to achieve Server Side Rendering using Angular Universal.
The rendering the App on the server side makes it load quickly and
also ensures that the search engines can crawl the content
다음 Angular Universal Tutorial은
Angular Universal을 사용하여 서버 측 렌더링을 달성하는 방법을 설명합니다.
서버 측에서 앱을 렌더링하면 앱이 빠르게 로드되고 검색 엔진이 콘텐츠를 크롤링할 수 있습니다.
Building & Hosting
Angular Resources
Angular how-to guides
- How to get the current Route
- ExpressionChangedAfterItHasBeenCheckedError in Angular
- Angular CLI Check Version
- Property ‘value’ does not exist on type ‘EventTarget’ Error in Angular
Module Loaders
The Angular application can use either SystemJs or Webpack module loader.
We will demonstrate how to make use of both the Loader by building a small application.
Angular 애플리케이션은 SystemJ 또는 Webpack 모듈 로더를 사용할 수 있습니다.
우리는 작은 응용 프로그램을 빌드하여 두 로더를 모두 사용하는 방법을 보여줍니다.
'Angular JS' 카테고리의 다른 글
Bootstrapping in Angular: How It Works Internally (0) | 2022.01.15 |
---|---|
How to Create a new project in Angular (0) | 2022.01.15 |
How to Install Angular and Set Up Development Environment (0) | 2022.01.15 |
Angular Architecture Overview & Concepts (0) | 2022.01.14 |
Introduction to Angular (0) | 2022.01.14 |
댓글