0
不`噸節目製作動態提供商頁面如何angularjs
$scope.sayHi=function(provider) {
\t \t $scope.Name=provider.Name
\t \t console.log(provider)
\t }
\t
\t $http.get("data.php")
.success(function(response) {
\t response.records.forEach(function($scope) {
\t \t app.provider($scope.City , function() {
\t \t \t return {
\t \t \t \t $get:function() {
\t \t \t \t \t return {
\t \t \t \t \t \t Name:$scope.Name
\t \t \t \t \t }
\t \t \t \t }
\t \t \t }
\t \t })
\t })
});
\t })
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.11/angular.min.js">
<input ng-model="city">
<p ng-click='sayHi(city)'>Click </p>
<p>This is name: {{name}}</p
> Blockquote**strong text**
</script>
我能做出提供商和訪問它使用的NG-模型
頁