我正在使用Appgyver Steroids为调度程序构建应用程序,在导航栏上,我有一个切换日期的按钮,但我无法弄清楚如何切换de label:
的index.html
public class NetworkSender extends Thread{
private Connection c;
private String msg;
public NetworkSender(Connection c, String msg){
this.c = c;
this.msg = msg;
}
public void run(){
try {
System.out.println("Trying to send");
c.sendObjects(msg);
System.out.println("Sent");
} catch (IOException e) {
e.printStackTrace();
}
}
}
public class NetworkReceiver extends Thread{
private Connection c;
private boolean running = true;
private Frame f;
public NetworkReceiver(Connection c, Frame f){
this.c = c;
this.f = f;
}
public void run(){
while(running){
System.out.println("running");
Object obj = null;
try {
obj = c.receiveObjects();
System.out.println("received");
} catch (ClassNotFoundException e) {
System.out.println("failed - class exception");
e.printStackTrace();
} catch (IOException e) {
System.out.println("failed - IO exception");
e.printStackTrace();
running = false;
}
if(obj != null){
if(obj instanceof String){
f.showMessage((String)obj);
}
}
}
}
public void kill(){
running = false;
}
}
drawerMenu.html
<script src="/scripts/application.js"></script>
<super-navbar-button ng-bind="dayTitle" side="right" onclick="supersonic.ui.drawers.open('right')">Day</super-navbar-button>
的application.js
<script src="/scripts/application.js"></script>
<li class="item" onclick="supersonic.ui.drawers.close('right')" ng-model="day" ng-click="newDay()">Monday</li>
<div style="clear: both;"></div>
<li class="item" onclick="supersonic.ui.drawers.close('right')" ng-model="day" ng-click="newDay()">Tuesday</li>
<div style="clear: both;"></div>
现在我甚至没有记录&#34;到了这里&#34;文字,可能是我有一个小错误或我遗漏的东西。这是我的第一个类固醇/超音速/角度/混合应用。提前谢谢。
答案 0 :(得分:0)
有两件事不用onclick with angular,而是点击
你尝试过做了吗?{{ day }}
而不是写这一天?