どうも、らこです。RC.5のリリースがおそらく来週と迫っていますが、多くのバグ修正と共に新しい機能が追加されます。 NgModuleはこれまでのAngular2で不便だったこと、複雑だったことを一気に解決してくれる新機能です。 RCも大詰めとなったこのタイミングで導入されることに困惑するかもしれませんが、 ぜひとも対応してもらいたいと思います。 はじめに NgModuleは完全に新しく導入されたAPIであり、既存のAPIへの破壊的変更ではありません。 ただし、従来の方法は非推奨となり、stableリリースの段階では廃止される予定です。 RC.5からは移行期間に入るものと思っていてください。 NgModule NgModuleの概要についてスライドを作ってあるので、これをベースに解説します。 NgModuleの概要 NgModuleは、ディレクティブやパイプ、サービスなどをひとまとめにしたモ
Angular2も含めAngular1.5からコンポーネント指向的な話があり、文字通り@Componentを利用する機会が増えるだろうと思います(Angular2を利用する場合、当然ですが)。ただインジェクションするときに「Componentをdirectivesに書いて」とか「ここはComponentで作るけど、ここはDirectiveにしよう」という話もあり「Component?Directive?ほげ?」みたいな話もあるのでまとめてみる Directives オーバービュー Angular2のディレクティブには3種類ある: Components Structural directives Attribute directives 「Component(コンポーネント)」はテンプレートと実際のディレクティブから成る。3種類のディレクティブの中でも最も一般的なもので殆どの場合、このCom
Angular 2 has an ability to develop an application in cross-platform because it doesn’t depend on DOM. But it’s breakable easily. If you use `window`,`document` or anything browser-specific, then of course your app will lose the ability. We often use `window` instance to get and set global variables. In browser platform, `window` is a single global context object. In the other side, Node.js enviro
すべて Tech Idea Diary 2024-07-03 読んだ本 2024-Q2 Diary読書 2024-07-03 Angular: v18.1で @let 構文が追加される TechAngularTypeScript 2024-06-26 WebブラウザにおけるOpenTelemetryの自動計装PoC: Trace via Service Worker TechWebOpenTelemetryService Worker 2024-06-23 Cloudflare Image Transformationで画像最適化した TechCloudflareBlog DevAstro 2024-06-20 Angular: Rendering EffectsとBusiness Effects TechAngularSignals 2024-06-14 計画の優先順位ではなく目標の優先
This article has been updated to the latest version Angular 17 and tested with Angular 16. The content is likely still applicable for all Angular 2 + versions. Angular brings many new concepts that can can improve our JavaScript applications. The first new concept to Angular is the use of Observables. Observables are a proposed feature coming to the JavaScript specification. I wont go in depth int
anguler2のチュートリアルを改造していて、 serviceで実行したHTTP POST通信の処理結果によって、 呼び出し元componentの画面を変更したくなった。 angular2 - Global Events in Angular 2 - Stack Overflow Service Events というものがあるらしい。 my app @Output() loginError = new EventEmitter(); を足して、 イベントを発生させたい(呼び出し元componentの関数を実行したい)タイミングで、 this.loginError.emit("Error:server returns false"); のようにevent emit service.ts import {Injectable} from 'angular2/core'; import {Ou
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く