---
title: "angular中ng-model绑定数组数据"
author: "Notebookdong"
date: "2016-03-08T21:24:04Z"
tags: []
categories: ["Web前端"]
slug: "angular-ng-model"
draft: false
lastmod: "2016-03-08T21:24:04Z"
id: 2281557
url: "https://notebookdong.iteye.com/blog/2281557"
---

使用angular绑定数组数据时，controller中定义的值类型要与html中写的一样，ng-model="{{number}}"为数字类型,ng-model="'{{number}}'"为字符串类型，如果controller中的的类型为$scope.number = 1;这时就不能加单引号