I am encountering an issue with angular and yeoman while executing grunt serve, which minifies and saves my angular app to the dist directory for production. Everything appears to be functioning correctly when I run my app on localhost, but after building it, something seems to go wrong that I cannot quite grasp at the moment. Any assistance would be highly appreciated.
Below is the controller I added to my project that seems to be causing the problem:
var myPlayer
angular.module('myapp')
.controller('ShowCaseTabCtrl', function ($scope) {
$scope.tabs = [
{
title:"Video",
content:'templates/showcased-video.html',
},
{
title:"Gallery",
content:'templates/showcased-gallery.html',
}
];
$scope.initVideo = function() {
videojs('showcase-video', {
'controls': true,
'autoplay': false,
'preload': 'auto',
'poster': 'images/posters/poster.jpg'
}, function(){
myPlayer = this;
myPlayer.dimensions(900, 600);
myPlayer.poster('images/posters/poster.jpg');
myPlayer.src([
{ type: 'video/mp4', src: 'video/myvideo.mp4' },
{ type: 'video/ogg', src: 'video/myvideo.ogv' }
]);
});
}
});
This is how the controller is implemented in my view:
<section ng-controller="ShowCaseTabCtrl">
<div class="mod-wrap full-bleed">
<tabset>
<tab ng-repeat="tab in tabs" heading="{{tab.title}}" content="{{tab.content}}" active="tab.active">
<ng-include src="tab.content" onload="initVideo()"></ng-include>
</tab>
</tabset>
</div>
The error message I receive after running grunt serve from yo-angular generator is as follows:
Error: [$injector:unpr] Unknown provider: aProvider <- a