AngularJs不显示json对象
我试图在表单末尾显示json对象,如AngularJs不显示json对象,angularjs,Angularjs,我试图在表单末尾显示json对象,如 <p> <input type="text" name="title" ng-model="blog.title" /> </p> <p> <textarea name="txt" ng-model="blog.txt"></textarea> </p> <p> <sel
<p>
<input type="text" name="title" ng-model="blog.title" />
</p>
<p>
<textarea name="txt" ng-model="blog.txt"></textarea>
</p>
<p>
<select name="type" ng-model="blog.type" ng-options="type.id as type.name for type in types" />
</p>
**{{blog}}**
<br/>
</form>
**{{blog}}**
但它不显示对象。但是如果我把{{blog}}
放在formopen标记后面,那么它就可以工作了
有什么想法吗?你试过这个吗
您需要关闭“选择标签”,即:
<select name="type" ng-model="blog.type" ng-options="type.id as type.name for type in types"></select>
{{blog}}
代替{{blog}试试{{types}你能提供一个plunkr吗?很好的技巧。非常感谢你
<select name="type" ng-model="blog.type" ng-options="type.id as type.name for type in types"></select>