function homepageController(n,t,i,r,u,f,e){function y(n){var r=new Date(n||Date.now()),t=""+(r.getMonth()+1),i=""+r.getDate(),u=r.getFullYear();return t.length<2&&(t="0"+t),i.length<2&&(i="0"+i),[t,i,u].join("/")}function l(n){console.log(n);n.find("img.lazy").lazyload()}function nt(){h.PredictExchange=s.$post("/_Partials/PredictExchange",{ma:["HSX","HNX"]}).then(function(n){n&&angular.forEach(n,function(n){n.Total=n.Up+n.Down;n.PerDown=Math.round(n.Down*100/n.Total);n.PerUp=100-n.PerDown;n.TradingDate=new Date(parseInt(n.TradingDate.substr(6)));var t=new Date(n.TradingDate),i=t.getDate()+"/"+(t.getMonth()+1);o.predictHSXTradingDate="Phiên "+i+": Tăng, Giảm, Đi ngang?";o.predictHSXTotal=n.Total;n.Name==="HSX"?(o.hsxPercent="p"+n.PerUp,o.hsxclassIamge=n.PerUp>n.PerDown?"bgcorw":"bgbear"):(o.hnxPercent="p"+n.PerUp,o.hnxclassIamge=n.PerUp>n.PerDown?"bgcorw":"bgbear")})})}function p(){$(".bxslider").bxSlider({minSlides:1,maxSlides:4,pager:!1,adaptiveHeight:!0,slideWidth:260,slideMargin:24,nextText:"",prevText:""})}function w(n){var t=n.Title.length<65?n.Title:n.Title.substring(0,65)+" ...";return'
  • '+t+'<\/h4 > <\/a>
    '+n.PublishTimeConvert+'<\/span>