< form ng-model="ap">
$scope.addProduct = function() {
$scope.products.detail[$scope.ap.id] = $scope.ap;
delete($scope.ap);
};
<section ng-init="tab = 1">
<ul class="nav nav-pills">
<li ng-click="tab = 1" ng-class="{active:tab === 1}"><a href="#">Descr</a></li>
<li ng-click="tab = 2" ng-class="{active:tab === 2}"><a href="#">Specs</a></li>
<li ng-click="tab = 3" ng-class="{active:tab === 3}"><a href="#">Reviews</a></li>
</ul>
{{tab}} <!-- Вот здесь Вы сами и выводите номер таба -->
</section>
<ul>
<li ng-repeat="link in menu" ng-class="{ active: isActive(\'{{ link.href }}\') }">
<a ng-href="{{ link.href }}" href="">{{ link.title }}</a>
</li>
</ul>
$scope.menu = [{
"title": "title1",
"href": "href1"
}, {
"title": "title2",
"href": "href2"
}, {
"title": "title3",
"href": "href3"
}];
$scope.isActive(location) {
return location === $location.path()
}
var a = document.getElementsByTagName("input");
var mas=[];
for (i=0;i<=3;i++){
mas[i]=a[i].value; // Из инпутов в массив
}
for (i=0;i<=3;i++){
a[i].value=mas[i]; // Обратно
document.getElementById('Products').innerHTML += mas[i];
}
<p><input type="button" value="Submit" onclick="save()"></p>
<div ng-app>
<div ng-click="Ctrl.showLogout = !Ctrl.showLogout">Певый div (Ctrl.showLogout = {{Ctrl.showLogout}})</div>
<div ng-if="!Ctrl.showLogout" class="second">Log out</div>
</div>
var app = angular.module("MyApp", []);
function Game() {
this.foo = function(size) {
this.arr = [];
for (var i = 0; i < size; i++) {
this.arr.push(i);
}
}
this.push = function(parent, index) {
this.sign = 'X';
this.position = parent + ', ' + index;
}
}
<div ng-app="MyApp">
<div ng-controller="Game as ctrl">
<table class="board">
<h1>Table</h1>
<input type="number" ng-model="val">
<button ng-click="ctrl.foo(val)">PRESS</button>
<tr ng-repeat="item in ctrl.arr">
<td ng-repeat="td in ctrl.arr" ng-click="ctrl.push($parent.$index, $index)">{{ctrl.sign}}</td>
</tr>
</table>
<h1> {{ctrl.position}}</h1>
</div>
</div>