javascript - Angular JS some result doesn't show in Google Chrome but show in FireFox -
i have created selectedproduct factory save data productdetailctrl , retrieve data in productorder ctrl
the factory below
.factory('selectedproduct',function(){ var products = {}; return{ addcategory: function(_category){ return products.category = {category: _category}; }, addselectedproduct: function(_name,_image,_quantity,_price){ return products.item = {name: _name, image: _image,quantity: _quantity,price: _price}; }, getselectedproduct: function(){ return products.item; }, getcategory:function(){ return products.category } } })
in product_detail.html, save parameter ng-click in :
<img ng-src="{{product.image}}" alt="{{product.product_name}}" ng-click="selectimage((detail.image = product.image),(detail.name = product.product_name),(detail.quantity = product.quantity),(detail.price = product.price))" width="500" height="340">
in productdetailctrl:
selectedproduct.addcategory($stateparams.categoryname); $scope.selectimage = function () { selectedproduct.addselectedproduct($scope.detail.name,$scope.detail.image,$scope.detail.quantity,$scope.detail.price); };
then call saved data in product_order.html:
<h3>rm {{selectedproduct.price}}</h3>
my productorderctrl:
$scope.selectedproduct = selectedproduct.getselectedproduct(); var categoryname = selectedproduct.getcategory();
but output can't show in chrome browser, works fine in device, , other browsers. wondering why this. idea , reason problem?
note: other data name, image link works fine in chrome price in 00.00 format can't show. price retrieved mysql online , stored in varchar.
result chrome
result firefox
there must caching in google chrome, try empty cache , hard reload option can performed in developer mode, simple right click on refresh button!
Comments
Post a Comment