2013-07-03 20 views

回答

1

你必須把它寫這樣的:

inthecontextof($rootScope, function(){ 
    this.flamingo = 5 //$rootScope.flamingo is what im refering to 
    $apply() 
} 

現在我不確定你期望「$ apply」在這裏做什麼;如果它要隱式引用「$ rootScope」,那麼應該沒問題。