2017-04-11 60 views

回答

2

您需要等到模式是開放的。如果你把你的代碼放在$timeout之內,它就可以工作。

$timeout(function(){ 
    // HERE is the Problem i cannot get input file element by queryselector/getElementById 
    console.log(document.getElementById('input-file-upload')) // returns null 
    console.log(document.querySelector('#input-file-upload')) // returns null 
}); 

或者,你可以使用$ mdDialog的onComplete財產。

+0

是的這一個真的很感謝,很多 –