我无法获得所选的选项值。
查看
<select class="form-control" ng-model="mySel">
<option ng-repeat="option in Array" value="@{{ option.id }}">@{{ option.name }}</option>
</select>
<button type="button" class="btn btn-primary" ng-click="getData(mySel);">Select</button>
控制器
scope.getData = function(selectedValue) {
alert(selectedValue);
}
返回undefined
。
答案 0 :(得分:0)
无需从html使用 public class LinkedListLoops {
private Node head;
private Node tail;
public void floydCycle(){
if(node == null) throw new NullPointerException();
Node temp = head;
Node fast = head;
Node slow = head;
while(fast.next != null){
slow = slow.next;
if(fast.next.next != null){
fast = fast.next.next;
}
if(fast == slow){
fast = temp;
while(fast != slow){
fast = fast.next;
}
while(fast.next != slow){
fast = fast.next;
}
fast.next = null;
}
}
}
}
代替
selectedValue
ng-model