1
我怎樣才能改變this.messages myfunction2裏面???謝謝Angularjs服務,如何更改服務功能內的服務屬性?
app.service('myservice', function() {
this.messages=[];
this.myfunction1=function(){
//Stuff
function myfunction2(){
//"How to access this.messages now?
}
}
});
完美,謝謝! – lukabers 2014-11-04 09:46:50