We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
font-end <-data-ajax back-end
font-end ajax-data-> back-end $scope,$http,{{}} 从后端把数据渲染到前端
ng-model可以用在input textarea select ng-model 跟 {{}}它们两个都可以渲染值 ng-model多了一个接受输入值的功能 双向数据绑定,$scope.name改变,ng-model="name", {{name}} ng-model改变,其他两个也会改变
把函数作为数据,绑定到html结构里面 html
<button ng-click="jk()">JK</button>
js
$scope.jk = function() { console.log('提交数据') $http.get('test.php', { params: { name: $scope.input } }).success(function(data) { }) }
表达式可以算数运算,字符串拼接
{{name+name}}
表达式也支持三元表达式,相当于if()else{}
{{name?'a':'b'}}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
数据从后端到前端
font-end <-data-ajax back-end
数据从前端到后端
font-end ajax-data-> back-end
$scope,$http,{{}} 从后端把数据渲染到前端
ng-model
ng-model可以用在input textarea select
ng-model 跟 {{}}它们两个都可以渲染值
ng-model多了一个接受输入值的功能
双向数据绑定,$scope.name改变,ng-model="name", {{name}}
ng-model改变,其他两个也会改变
ng-click
把函数作为数据,绑定到html结构里面
html
js
表达式
表达式可以算数运算,字符串拼接
表达式也支持三元表达式,相当于if()else{}
The text was updated successfully, but these errors were encountered: