Use rootScope variables in my html

前端 未结 5 1033
我寻月下人不归
我寻月下人不归 2020-12-24 10:16

So we can use scope variables in our angular html easily like this:



  
    

        
5条回答
  •  情话喂你
    2020-12-24 10:58

    You do not need to specify $rootScope in html. You can use it the same way as you use $scope variables

    Just update from

    Hello {{yourName}} you are in in {{$rootScope.zoneName}}!

    to

    Hello {{yourName}} you are in in {{zoneName}}!

提交回复
热议问题