Skip to content

Cannot read property 'scope' of undefined #8

@danidev

Description

@danidev

Hello,

I've just installed angular.panels by bower and configured as in the tutorial.

when I call panels.open('left-menu') I get this error:

TypeError: Cannot read property 'scope' of undefined
    at Object.s.open (angular.panels.min.js:formatted:21)

here is my config:

.config(['panelsProvider', function (panelsProvider) {
    panelsProvider
        .add({
            id: 'left-menu',
            position: 'left',
            size: '700px',
            templateUrl: 'components/leftmenu/leftmenu.html',
            controller: 'LeftMenuCtrl'
        });
  }

and this is my controller:

(function() {
    'use strict';
    function LeftMenuCtrl($scope) {
        var self = this;
        self.init = function() {
            console.log('left panel');
        };
        self.init();
    }

    angular.module('myapp')
        .controller('LeftMenuCtrl', ['$scope', LeftMenuCtrl]);
})();

Any ideas?

thanks in advance,
Daniele

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions