今天遇到一個問題:在controller中有一個域屬性:$scope.state,對應的頁面中<span>{{state}}</span>.當在controller中改變$scope.state的值得時候,頁面中不能一起同步改變。
解決方法:在controller中定義state屬性的時候,寫成對象的形式。如
$scope.switch = {
state:true
}
在頁面中獲取的時候:<span>{{switch.state}}</span>.這樣就能獲取到了。
今天遇到一個問題:在controller中有一個域屬性:$scope.state,對應的頁面中<span>{{state}}</span>.當在controller中改變$scope.state的值得時候,頁面中不能一起同步改變。
解決方法:在controller中定義state屬性的時候,寫成對象的形式。如
$scope.switch = {
state:true
}
在頁面中獲取的時候:<span>{{switch.state}}</span>.這樣就能獲取到了。
https://github.com/zhangbo2008/Trie_with_informationExtraction_and_fuzzy_matchingv2