LoginSignup
1
1

More than 5 years have passed since last update.

$rootScopeのコードリーディングメモ

Posted at

on

$broadncast/$emitで発火する関数を登録する
$$litenerに配列として保持している

$broadcast

$$litenerを舐めて、関数を実行します。
単純にループで回して実行+下位のスコープを探索してる。

$emit

$$listenerを舐めて関数実行します
上位に向かって探索する

$apply

$digestのラッパー。$digest中はExceptionを
投げるので要注意

$digest

watchリストを評価して、実行する。
domとのひも付けのng-bingingもwatchリストに登録されてる。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1