1

I have some angularjs ngHide and ngShow code. They work fine in Chrome but show the opposite in IE. The following is what the code looks like:

 <section ng-controller="ctrl">
     <div class="details" ng-show="showDetails">
         Section 1
     </div>

     <div class="move-details" ng-hide="showDetails">
         Section 2
     </div>
 </section>

JS File:

var ctrl = ['$scope', 'model', function($scope, model) {
     $scope.showDetails = true;
}];

The text with Section 2 is shown instead of Section 1 in IE but Section 1 is shown in Chrome like I would expect.

Am I just missing something?

4

1 回答 1

0

切换<section><div>标签解决了这个问题。

于 2013-10-04T21:14:25.483 回答