Вот мой html-код, но я думаю, что ng-init не работает.Угловая ошибка баяна JS
<div ng-init="accordion=1">
<h3 class="accordion" ng-class="{active:accordion==1}">
<a href ng-click="accordion = 1">Section 1</a>
</h3>
<p class="accordion-content" ng-show="accordion==1">Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using</p>
<h3 class="accordion" ng-class="{active:accordion==2}">
<a href ng-click="accordion = 2">Section 2</a>
</h3>
<p class="accordion-content" ng-show="accordion==2">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using</p>
<h3 class="accordion" ng-class="{active:accordion==3}">
<a href ng-click="accordion = 3">Section 3</a>
</h3>
<p class="accordion-content" ng-show="accordion==3">There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form</p>
</div>
Я надеюсь, что это может надеяться работать, как следовать в первый раз, но он не работает должным образом
Но это показывает, как это.
Я уверен, что не может быть никаких проблем в JS и стилизации работы.
Пожалуйста, смотрите здесь. https://jsfiddle.net/koaqayb3/11/
У меня уже есть один модуль и хотелось бы знать, как их интегрировать.
var module = angular.module ('myApp', ['ngAnimate', 'ngTouch', 'ngScrollbars', '']);
var app = angular.module ('myApp', []);
Заранее спасибо.
, если это возможно, то плз поделитесь jsfiddle ссылкой – lalitpatadiya
вы получаете какую-либо ошибку в консоли? – shershen
Ваш код работает [скрипка] (http://jsfiddle.net/U3pVM/23522/) –