連載目次 前回の「いまさら聞けないAngularJSの基礎知識と5つの主な特徴、インストール、簡単な使い方」では、AngularJSの概要について紹介しました。今回は引き続き、AngularJSについて解説していきます。 なお、本記事を見て実際にサンプルを動かしたい場合は、以前の連載記事(第1回、第2回)を見て環境を作成しておきましょう。 AngularJSのコントローラー 前回のサンプルでは、取りあえずHTMLだけ使用してAngularJSを動かしてみましたが、実際のアプリではコントローラーと共に使用することが多いです。ここではコントローラーの基本について説明します。 AngularJSにおいてコントローラー(Controller)は、モデルとビューを操作するためのコンポーネントであり、ユーザーの操作に応じた動きやサーバー通信を行う場合などに使用します。このコントローラーの実態は、Ang