有些時候,某些變數會直接定義在HTML 的ng-init 中(例如是透過backend 吐出來的值等等). 如果要在AngularJS Controller 中取得該變數,必須利用$watch ...
確定! 回上一頁