0

I'm working on a project where I need to integrate a video plugin named "videogular" on angular-filemanager using electronJS platform .

this is the link for the videogular

this is my project Dependency Injection :

(function (angular) {
        'use strict';
        var FileManagerApp = angular.module('FileManagerApp');

        FileManagerApp.controller('FileManagerCtrl',
            ['$scope', 
            '$rootScope', 
            '$window', 
            '$translate', 
            'fileManagerConfig', 
            'item', 'fileNavigator', 
            'apiMiddleware',
        function ($scope,$rootScope, $window, $translate, fileManagerConfig, Item, FileNavigator, ApiMiddleware)

and this is the videogular Dependency Injection :

angular.module('myApp',
        [
            "ngSanitize",
            "com.2fdevs.videogular",
            "com.2fdevs.videogular.plugins.controls",
            "com.2fdevs.videogular.plugins.overlayplay",
            "com.2fdevs.videogular.plugins.poster"])
    .controller('HomeCtrl',
        ["$sce", function ($sce) {

        }]
    );

when I tried to integrate it this way :

(function (angular) {
    'use strict';
    var FileManagerApp = angular.module('FileManagerApp',
    [
        "ngSanitize",
        "com.2fdevs.videogular",
        "com.2fdevs.videogular.plugins.controls",
        "com.2fdevs.videogular.plugins.overlayplay",
        "com.2fdevs.videogular.plugins.poster"]);

    FileManagerApp.controller('FileManagerCtrl',
     [
         '$scope', 
         '$sce', 
         '$rootScope', 
         '$window', 
         '$translate', 
         'fileManagerConfig', 
         'item', 
         'fileNavigator', 
         'apiMiddleware',

                function (
                        $scope ,
                        $sce,
                        $rootScope, 
                        $window, 
                        $translate, 
                        fileManagerConfig, 
                        Item, 
                        FileNavigator, 
                        ApiMiddleware) {

I get this error

please help me figure out this problem.

Firas
  • 13
  • 4

1 Answers1

1

You need to inject FileManagerApp in myApp module to use it.

angular.module('myApp',
        [
            "ngSanitize",
            'FileManagerApp', // <--- here
            "com.2fdevs.videogular",
            "com.2fdevs.videogular.plugins.controls",
            "com.2fdevs.videogular.plugins.overlayplay",
            "com.2fdevs.videogular.plugins.poster"])

or if vice-versa:

var FileManagerApp = angular.module('FileManagerApp',
[
    "ngSanitize",
    "myApp", // < -- here
    "com.2fdevs.videogular",
    "com.2fdevs.videogular.plugins.controls",
    "com.2fdevs.videogular.plugins.overlayplay",
    "com.2fdevs.videogular.plugins.poster"]);

Note

Make sure you are not injecting

    "com.2fdevs.videogular",
    "com.2fdevs.videogular.plugins.controls",
    "com.2fdevs.videogular.plugins.overlayplay",
    "com.2fdevs.videogular.plugins.poster"

to both of the modules.Just inject in either one.

Shashank Vivek
  • 16,888
  • 8
  • 62
  • 104
  • can I do the reverse ? integrate the the videogular with the file manager because I did a lot of work there – Firas Jun 22 '18 at 11:45
  • @Firas : Do you mean injecting `myApp` to `FileManagerApp` ??. Yes, you can do that. Just reverse the injection. its difficult to understand your actual question. Please update the error image as per my suggestion as well – Shashank Vivek Jun 22 '18 at 11:48
  • all what I want is the make videogular work on my file manager – Firas Jun 22 '18 at 13:35
  • @Firas : Try the other part of my answer. And update ur question as per my feedback. You are ignoring that and asking for a solution. – Shashank Vivek Jun 22 '18 at 13:46