假設(shè)parent scope里有:$scope.myData = "some data";
自定義的directive是這樣<my-directive data-source="myData"></my-directive>
如果想在directive獲取到$scope.myData的數(shù)據(jù)該怎么辦(data-soucre是一個(gè)可變參數(shù) 但是形式不定 如果需要也可以寫成scope.myData之類)
scope的映射應(yīng)該怎么寫
在diecrive里用@
已經(jīng)解決了 用property : =attr就可以了