我正在尝试使用https://github.com/logbon72/angular-recorder
中的角度记录器 Controller 'ngAudioRecorder',
required by directive 'ngAudioRecorderAnalyzer', can't be found!
我已完成bower-install
并将文件添加到依赖项中。
我尝试使用<ng-audio-recorder-analyzer></ng-audio-recorder-analyzer>
正如Y.Puzyrenko所述,需要在<ng-audio-recorder-analyzer>
内附加一个<ng-audio-recorder>
recorder controller
对象。
有效的代码:
<ng-audio-recorder id='audioInput' audio-model="recorder.audioModel">
<!-- Start controls, exposed via recorder-->
Current microphone input:
<ng-audio-recorder-analyzer ng-model="a.audioModel"></ng-audio-recorder-analyzer>
<button ng-click="recorder.startRecord()" type="button" ng-disabled="recorder.status.isRecording" class="btn btn-default">
Start Record
</button>
<button ng-click="recorder.stopRecord()" type="button" ng-disabled="recorder.status.isRecording === false" class="btn btn-default">
Stop Record
</button>
<button ng-click="recorder.playbackRecording()" type="button"
ng-disabled="recorder.status.isRecording || !recorder.audioModel" class="btn btn-default"> Playback
</button>
<!-- End controls-->
</ng-audio-recorder>
答案 0 :(得分:1)
发生此问题是因为您没有在元素上指定ng-audio-recorder
指令,或者它是父元素。
例如。 <ng-audio-recorder><ng-audio-recorder-analyzer></ng-audio-recorder-analyzer></ng-audio-recorder>