I am working on component based architecture using angular 1.5 and have 
created a component similar to below in my application I can able to access 
functions /properties in the controller function within component file like 
below .But if I move controller to a *separate file* and getting error 
"controller is not defined" at *Somecomponent.js *.Can anyone help me what 
is the cause of this issue?

*Somecomponent.js*

(function(){
angular.module('myapp')
    .component('myComponent', {
        templateUrl: 'some.html',
        controller: MyController, //error at this line
        controllerAs: 'myCtrl',
        bindings: {
            items: '<'
        }
    });
function MyController()
{
}
})();


Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to