0
私はangularjsの初心者です。角度スコープ変数が動的に作成されていないhtml
タイプ(ビジネスロジック)のベースにhtmlを作成しています。ここでは、いくつかのオブジェクトプロパティが動作しています。
ここに私のコード: - ビューで
$scope.changeObj=$scope.attributes[countInc];
switch ($scope.changeObj.type) {
case 'text':
html+='<input type="text" class="form-control" ng-value="changeObj.type">';
//Here, changeObj.type is working//
$scope.rangeShow=true;
break;
case 'select':
html='<select class="form-control" ng-options="optionsO.key as optionsO.value for optionsO in changeObj.options"></select>';
//Options unable to create. I dont know changeObj.options is working or not.//
break;
default:
}
eleDiv.html(html);
$compile(eleDiv)($scope);
一部text case
は仕事ですが、select case
オプションで作成されていません。