Annyang.js과 Angular.js을 통합하려고합니다.Annyang.js 음성 인식을 Angular.js와 통합
DOM을 사용하여 Annyang.js 바인드 (각도 스타일) 결과를 만들려고합니다. 어떤 아이디어는 $ watch, $ apply, $ digest와 같은 각도 서비스를 사용하거나 지시어/공장/공급자를 만드는 것일 수 있습니다 ??? 나는 잃어 버렸다. 도움을 주시면 감사하겠습니다.
지금까지, 그것은 VoiceCtrl 범위 내에서 명령을 이해하지만 $ scope.said
자바 스크립트에 결합하지 않습니다
이var SpeechApp = angular.module('SpeechApp', []);
function VoiceCtrl($scope) {
$scope.said='';
$scope.helloWorld = function() {
$scope.said = "Hello world!";
}
$scope.commands = {
'hello (world)': $scope.helloWorld,
};
annyang.debug();
annyang.init($scope.commands);
annyang.start();
}
HTML이 :
<body ng-app="Voice" ng-controller="VoiceCtrl">
<p>{{said}}</p>
</body>