简单的问题。如何在html中设置范围值,在我的控制器中读取?
原文链接:https://www.f2er.com/angularjs/146854.html<div ng-controller="MyController"> <div name='my_map' scope-myVar='Richmond,VA' scope-someOther='test'> </div> </div> #controller MyController = function($scope){ alert($scope.myVar) };
JSFiddle:http://jsfiddle.net/ncapito/YdQcX/