2017-04-11 83 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

是的这一个真的很感谢,很多 –