您好,正在尝试显示来自 Controller 作用域的文本。
这里是尝试过的:
html:
<div ng-repeat="item in sResults"></div>
Controller JS:
$scope.sResults = [];
function App( ){
var Label = ‘a’;
var demo = [“a”,”b”,’c’,’d’];
jQuery.each( demo, function( index, value) {
debugger;
if(scopeLabel==value){
debugger;
$scope.sResults.push(value);
}
});
}
最佳答案
您没有将项目打印到 html 中
<div ng-repeat="item in sResults">{{item}}</div>
关于javascript - 文本不显示在 html angular js 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24161430/