2016-05-09 6 views
-1

を働いていないNG-クリック

<div class="form-group"> 
 
    <select class="form-control" dir="rtl" style="width:100%;" ng-model="ProfilesName" ng-options="Profiles.profile_name for Profiles in ProfilesName" ng-change="loaddata()"> </select> 
 
</div>
次のコードでのショーとしての機能 loaddata()を呼び出します

ng-change何も起こりません。それを修正するには?

+0

をNG-コントローラディレクティブ、その文句を言わない仕事を配置するのを忘れていたと思います。 – OBender

+0

質問とコードフォーマットが悪いので、どうすれば助けてくれますか? – Raduken

答えて

0

私は正しくあなたの質問をフォーマットしてくださいあなたはそれなしで

myApp.controller('ProfileTweets', ['$scope', '$http', '$location', function ($scope, $http, $location) { 
 
$http({ 
 
    url: '../ProfilesName/', 
 
    method: 'GET' 
 
}).then(function (itemdata) { 
 
    $scope.ProfilesName = itemdata.data; 
 
}); 
 
$scope.loaddata = function() { 
 
    alert('hiii'); 
 
} 
 
}]);
<div class="form-group" ng-controller="ProfileTweets"> 
 
        <select class="form-control" 
 
         dir="rtl" style="width:100%;" 
 
         ng-model="ProfilesName" 
 
         ng-options="Profiles.profile_name for Profiles in              ProfilesName" 
 
         ng-change="loaddata()"> 
 
        </select> 
 
</div>

関連する問題