나는 입력의 초점을 제어하고 키보드가 보여주는 지시문을 사용합니다.ngCordova plugin.keyboard undefined
directives.showKeyboard = function($cordovaKeyboard) {
var linkFn = function(scope, element, attrs) {
element.bind("focus click",
function(e) {
e.preventDefault();
if(scope.$eval(attrs.showKeyboard)) {
$cordovaKeyboard.hideAccessoryBar(true);
}
}
);
};
var keyboardDirective = {
restrict : 'A',
link: linkFn
};
return keyboardDirective;
}
html로 : 입력 포커스를 얻을 때
<input id="search_post" type="search" placeholder="Search post" my-enter="search_posts(true)" ng-model="searchText"
style="width:100%;height:26px" show-keyboard="true" required>
, 그것은 다음과 같은 오류가 발생이 :
ng-cordova.js:4711 Uncaught TypeError: Cannot read property 'Keyboard' of undefined
나는 플러그인 및 ngCordova lib 디렉토리가 성공적으로 설치되었는지 확인했습니다.
무엇이 잘못 되었나요?
는, 다음과 같은 오류가 발생 : 형식 오류 : 아직 문제가 해결 되었습니까 정의되지 않은 – domoindal
의 '컴파일'속성을 읽을 수 없습니다 하지, 여기에 솔루션입니다? –
나는 같은 문제가있다. 항상 같은 오류가 있습니다. – domoindal