Understanding AngularJS ng-src

前端 未结 6 1967
猫巷女王i
猫巷女王i 2020-12-03 09:51

As explained here, the angularjs directive ng-src is used to prevent the browser from loading the resource (e.g. image) before the handlebars get parsed. I\'m currently usin

6条回答
  •  旧巷少年郎
    2020-12-03 10:35

    I am sure 100% work

    First you have to make your query like this

    select (select '../Images/'|| T_LANG2_NAME ||'.png' T_LANG2_NAME from T04222_T where T_LOG_ID = T04220.T_C_STATUS) TIMER from T04220 
    where T_PAT_NO = '89004331' group by T_C_STATUS 
    having max(T_ARRIVAL_DATE) = (select max(T_ARRIVAL_DATE) from T04220 where T_PAT_NO = '89004331');) then you write Code for Controller like this ( if (scope.T_PAT_NO) {
                    debugger;
                    $http({
                            method: 'POST',
                            url: '/T04205/GetTimerImage',
                            data: JSON.stringify({ PatientCode: scope.T_PAT_NO })
                        }).
                        success(function (data) {
                            debugger;
                            var newDataJSON = JSON.parse(data);
    
                            scope.TIMER = newDataJSON[0].TIMER;
    
                        });
    

    then html code like this

    
    

提交回复
热议问题