本文へスキップ
製品デスクトップツールTASTECAD図面の確認TASTEFILESファイル管理TASTEFTPファイル転送TASTESSHリモートワークスペースTASTEZIP圧縮と展開TASTEWINMファイル管理開発ツールTASTECODERust 統合開発環境TASTESTUDIO統合開発・テスト環境TASTEETLデータ統合(ETL)サーバーTASTEREMOTEリモートデスクトップサーバーTASTEGEO空間情報サーバーTASTEMAILメールワークスペース投資TASTESTOCK株式自動売買デスクトップアプリはじめるダウンロードドキュメント購入すべての製品
マーケットプレイス
ニュース
技術ニュース今日の開発ニュース開発ドキュメントプログラミング言語RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartWebフロントエンド フレームワークNext.jsReactVue.js · NuxtSvelteKitAngularサーバー フレームワークSpring BootDjangoFastAPIASP.NET CoreNestJS · Expressアプリ・デスクトップ フレームワークTauriFlutterReact NativeElectronアルゴリズムアルゴリズムの基礎主要アルゴリズム発展アルゴリズム実務のアルゴリズム
コミュニティプロジェクト開発ログプロンプトAIツールの問題ショーケースコミュニティガイド
協業技術移転ウェブサイト構築デスクトップアプリ構築リリース・決済パイプライン販売パートナーお問い合わせ
サービスリモートデスクトップインストールパッケージのカスタマイズ
TASTEDEV
製品

デスクトップツール

TASTECAD複雑な図面を、軽やかにひらくTASTEFILES必要なファイルだけを、最速でTASTEFTPファイルが行き交う、いちばん端正な道TASTESSHサーバーとあなたを、より確かにつなぐTASTEZIPより速くまとめ、より安全にひらくTASTEWINM2つの画面で整理する、キーボード中心のファイルマネージャー

開発ツール

TASTECODERust アプリの編集・ビルド・デバッグ・テストまでひとつのウィンドウでTASTESTUDIO編集からリモートテスト、承認した AI 修正までTASTEETL値を見ながら、データを運ぶ

サーバー

TASTEREMOTE自社サーバーで運用するリモートデスクトップTASTEGEOGeoServer 互換の空間情報サーバーを Rust で作り直しますTASTEMAILメールの主導権を、もう一度自分の手に

投資

TASTESTOCKいつ・何を。自分で決めたルールどおりに動く株式自動売買

はじめる

ダウンロード全製品の最新版ドキュメント各製品の使い方購入サブスクリプション・永久ライセンスすべての製品全製品を一覧で
すべての製品
マーケットプレイスニュース
技術

ニュース

今日の開発ニュース言語・フレームワーク・GitHub・AI の公式発表開発ドキュメント言語・フレームワーク・アルゴリズムのガイド

プログラミング言語

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

フレームワーク

Webフロントエンド フレームワークNext.jsReactVue.js · NuxtSvelteKitAngular
サーバー フレームワークSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
アプリ・デスクトップ フレームワークTauriFlutterReact NativeElectron

アルゴリズム

アルゴリズムの基礎計算量解析 · ソート · 探索 · 基本データ構造 · 木構造とヒープ主要アルゴリズムグラフ探索 · 最短経路と最小全域木 · 動的計画法 · 貪欲法 · 分割統治法 · バックトラッキング発展アルゴリズム文字列アルゴリズム · 数学と整数論 · ビット演算 · セグメント木 · Union-Find実務のアルゴリズムコーディング面接対策 · LRUキャッシュ · レート制限 · コンシステントハッシュ法
開発ドキュメントをすべて見る
コミュニティ
プロジェクトビルダーと作品を探す開発ログ決定と試行錯誤プロンプト再利用できる指示AIツールの問題Claude・Codex・Gemini の問題と回避策ショーケース完成した成果コミュニティガイドオープンにつくる方法
協業
技術移転Rust・egui でネイティブアプリを作るウェブサイト構築10言語、アカウント、ドキュメントとダウンロードデスクトップアプリ構築Rust・egui、WebView なしリリース・決済パイプライン署名・MSI・deb・rpm・AppImage・ハッシュ販売パートナー紹介して決済額の30%お問い合わせ構築・提携・投資のご相談
サービス
リモートデスクトップブラウザから自分のパソコンへインストールパッケージのカスタマイズ必要な機能だけ、設定は事前に
購入
JA
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
ログイン
ログイン
TASTEDEV

小さなツールから、より良い開発へ。

support@tastedev.netTASTEDEVを支援
製品製品ラインナップ購入ドキュメントダウンロードマーケットプレイスサポート
コミュニティプロジェクト開発ログプロンプトAIツールの問題ショーケース
ポリシー会社概要プライバシーポリシー利用規約サブスクリプション規約返金ポリシーコミュニティガイドライン
アカウントログイン新規登録
訪問者
今日
昨日
累計閲覧
商号
GXSOFT
代表者
CHOI YOUNG GU
事業者登録番号
853-44-00368
所在地
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
電話
+82-10-4404-1523
メール
whitecalvin@tastedev.net
個人情報保護責任者
CHOI YOUNG GU

© 2026 TASTEDEV製品情報は検証済みの開発ソースに基づいています。リリース・改善中

Angular ドキュメント
Angular
Getting Started with AngularProject StructureCore ConceptsData and StateTestingDeployment
ディスカッション

Angular ガイド · 3/6

Core Concepts

この章は現在、英語でのみ提供しています。

Angular applications are built from a handful of ideas: standalone components with templates, signals for reactive state, services shared through dependency injection, and the router. This chapter covers each of them with small, working examples.

Standalone components

A component is a TypeScript class with the @Component decorator. It declares a selector, a template and the other components or directives it uses in imports. Components are standalone by default, so no NgModule is needed. Inputs and outputs are declared with the input() and output() functions:

import { Component, input, output } from '@angular/core';

export interface Hero {
  id: number;
  name: string;
}

@Component({
  selector: 'app-hero-card',
  template: `
    <h3>{{ hero().name }}</h3>
    <button type="button" (click)="selected.emit(hero())">Select</button>
  `,
})
export class HeroCard {
  readonly hero = input.required<Hero>();
  readonly selected = output<Hero>();
}

An input is itself a signal, so the template reads it as hero(). A parent uses the component like an HTML element and must add HeroCard to its own imports.

Templates and bindings

Templates are HTML with a few extra syntaxes:

SyntaxMeaning
{{ value }}Text interpolation
[property]="expr"Bind an element or component property
(event)="handler($event)"Listen to a DOM event or component output
[(value)]="state"Two-way binding (for example with model() inputs)
[class.active]="isActive"Toggle a CSS class

Control flow: @if, @for and @switch

Built-in control flow blocks replace the older *ngIf and *ngFor directives and need no imports:

<ul>
  @for (hero of heroes(); track hero.id) {
    <li>
      <app-hero-card [hero]="hero" (selected)="select($event)" />
    </li>
  } @empty {
    <li>No heroes yet.</li>
  }
</ul>

@if (current(); as hero) {
  <p>Selected: {{ hero.name }}</p>
} @else {
  <p>Pick a hero.</p>
}

@switch (mode()) {
  @case ('edit') { <p>Editing</p> }
  @default { <p>Read-only view</p> }
}

@for requires a track expression, usually a unique id, so Angular can reuse DOM nodes when the list changes. @empty renders when the list has no items. There is also for lazy-loading part of a template and for declaring a local template variable.

この章について質問がありますか?
前の章Project Structure次の章Data and State
@defer
@let

Signals

A signal is a value that notifies Angular when it changes. computed() derives a read-only value from other signals and recalculates only when they change. effect() runs side effects, such as logging or syncing to storage, whenever the signals it reads change:

import { Component, computed, effect, signal } from '@angular/core';

@Component({
  selector: 'app-counter',
  template: `
    <p>{{ count() }} x 2 = {{ double() }}</p>
    <button type="button" (click)="increment()">+1</button>
  `,
})
export class Counter {
  protected readonly count = signal(0);
  protected readonly double = computed(() => this.count() * 2);

  constructor() {
    effect(() => console.log('count is now', this.count()));
  }

  increment() {
    this.count.update((value) => value + 1);
  }
}

Use set() to replace a value and update() to derive the next value from the current one. Prefer computed() over effect() for anything that can be expressed as a derived value.

Services and dependency injection

Logic that several components share belongs in a service. @Injectable({ providedIn: 'root' }) makes one instance available to the whole app, and inject() retrieves it:

import { Injectable, signal } from '@angular/core';
import { Hero } from './hero-card';

@Injectable({ providedIn: 'root' })
export class HeroService {
  private readonly heroes = signal<Hero[]>([{ id: 1, name: 'Windstorm' }]);
  readonly all = this.heroes.asReadonly();

  add(name: string) {
    this.heroes.update((list) => [...list, { id: Date.now(), name }]);
  }
}

In a component, write private readonly heroService = inject(HeroService); as a class field. Angular creates the service the first time it is requested. To give a component its own instance instead, list the service in that component's providers array.

Routing

Routes map URL paths to components. loadComponent splits a page into a separate bundle that loads only when the route is visited:

import { Routes } from '@angular/router';
import { HeroList } from './heroes/hero-list';

export const routes: Routes = [
  { path: '', component: HeroList, title: 'Heroes' },
  {
    path: 'heroes/:id',
    loadComponent: () => import('./heroes/hero-detail').then((m) => m.HeroDetail),
  },
  { path: '**', redirectTo: '' },
];

Import RouterLink and RouterOutlet where you need them, link with <a routerLink="/heroes/42">, and render the active page with <router-outlet />. With withComponentInputBinding() enabled in provideRouter, a route parameter such as id arrives in the component as readonly id = input<string>(). Guards such as canActivate are plain functions that can inject() services.

Summary

  • Components are standalone classes with a selector, a template and their own imports.
  • input(), output() and template bindings connect parent and child components.
  • @if, @for (with track) and @switch control what the template renders.
  • Signals, computed() and effect() hold and react to state.
  • Services with providedIn: 'root' are shared through inject(); the router maps URLs to components.

コメント 0件

人気のコメント順新しい順

ログイン · ログインするとコメントできます。