当用户从下拉框中选择选项时,我有不同的图像,显示不同的图像,但我得到相同的图像。
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00000000"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
答案 0 :(得分:1)
您尚未在控制器中添加您从下拉列表中调用的功能$scope.fun
;添加它:
app.controller('myCtrl', function($scope) {
...
$scope.fun = function (){
//Call API here, Pass selected model and in success method of api set $scope.selectedObj = response;
//response is may be something like this {name:"category1", imageSrc: ["photo1.jpg","photo2.jpg".....]}
};