2013-07-16 42 views
2
<div class="row-fluid" ng-repeat="timeline in timeline_events"> 
    <div class="span3 span3-min"><p>{{timeline.link}}</p></div> 
    <div class="span2 span2-min"><p>{{timeline.other}}</p></div> 
    <div class="span2 span2-min"><p>{{timeline.description}}</p></div> 
    <div class="span1 span1-min"> 
     <p> 
      <a class='del-timeline' ng-click='delTimeline($index)'>X</a> 
     </p> 
    </div> 
</div> 

的timeline_events工作正在呈現完美的Chrome,但不是在firefox.I清除了會議,並checked.NO result.What可能是這個問題?NG重複在Firefox不工作,完美的鍍鉻

更新:所以我通過ajax request.Firefox訪問timeline_events,如果我不通過ajax獲取值,則不呈現任何ng-repeat指令。在Chrome和Safari中完美工作。任何補救措施?

+1

你嘗試找出是否有任何異常或通過使用螢火蟲錯誤?控制檯中的任何東西? 你能夠在jsfiddle或者類似的情況下重現你的問題嗎? – alfrescian

+1

@alfrescian我檢查了firebug.No問題。如果通過ajax獲取值,ng-repeat不是在firefox中呈現的 – shajin

回答

1

這裏是你的代碼的JS小提琴,也應該工作在Firefox:

<div ng-controller='mainCtrl' class="container"> 
<div class="row-fluid" ng-repeat="timeline in timeline_events"> 
    <div class="span3 span3-min"> 
     <p>{{timeline.link}}</p> 
    </div> 
    <div class="span2 span2-min"> 
     <p>{{timeline.other}}</p> 
    </div> 
    <div class="span2 span2-min"> 
     <p>{{timeline.description}}</p> 
    </div> 
    <div class="span1 span1-min"> 
     <p> <a class='del-timeline' ng-click='delTimeline($index)'>X</a> 
     </p> 
    </div> 
</div> 

angular.module('myApp', []) 
    .controller("mainCtrl", function ($scope) { 
    $scope.timeline_events = [{ 
     link: 'link 1', 
     other: 'other 1', 
     description: 'description 1' 
    }, { 
     link: 'link 2', 
     other: 'other 2', 
     description: 'description 2' 
    }, { 
     link: 'link 3', 
     other: 'other 3', 
     description: 'description 3' 
    }]; 
    $scope.delTimeline = function (index) { 
     $scope.timeline_events.splice(index, 1); 
    }; 
}); 

http://jsfiddle.net/alfrescian/5hVmc/

+1

這就像一個魅力..但不是mine.I嘗試與其他一些Firefox並工作。可能問題與這個版本的firefox.I昨天安裝了firefox.Thanks你的時間 – shajin