Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support controller without $scope function parameter. #71

Closed
angelozerr opened this issue Jun 18, 2014 · 10 comments
Closed

Support controller without $scope function parameter. #71

angelozerr opened this issue Jun 18, 2014 · 10 comments
Assignees
Milestone

Comments

@angelozerr
Copy link
Owner

If we write controller with $cope function parameter :

var myApp = angular.module('store');
myApp.controller('StoreController', function($scope) {

});

StoreController is available inside HTML completion ng-controller.

But If we write controller without $cope function parameter :

var myApp = angular.module('store');
myApp.controller('StoreController', function() {

});

StoreController is not available inside HTML completion ng-controller.

@Matt-Robinson
Copy link

Hi.
I seem to have the same problem, but my controller has a $scope parameter:

//Controller for Entry Controller
app.controller('EntryCtrl', function ($scope, $http, $location, Data, Config) {
...
});

So perhaps there is a more fundamental bug here..... :)

@angelozerr
Copy link
Owner Author

Please share your project which causes your problem.Thank's

@Matt-Robinson
Copy link

Unfortunately, I'm not able to do that right now for my specific project, but it should be easy to re-create.

@Matt-Robinson
Copy link

Just figured out something interesting. In order for the Controller to be recognised, I was able to right-click on the appropriate controller name in the Angular Explorer and select the 'Link to Controller' option. It looks like this links the open HTML file to the controller and resolves the issue! 👍

@angelozerr
Copy link
Owner Author

Ok cool.

@nicodega
Copy link

Hi, I just wanted to know if this problem is still present on 0.5.0 version, because at my workplace good practices dictate we use controllerAs notation, and controllers won't be recognized on the Angular Explorer view if $scope is not specified as a parameter.

Thanks a lot for your efforts!

@angelozerr
Copy link
Owner Author

I would like to finish my work about JSP support for AngularJS and after I will try to fix this issue.

@angelozerr angelozerr added this to the 0.5.0 milestone Aug 24, 2014
@angelozerr angelozerr self-assigned this Aug 24, 2014
@angelozerr
Copy link
Owner Author

@nicodega
Copy link

This is great angelo, thanks a lot!

It woks like a charm!

On Tue, Aug 26, 2014 at 1:34 PM, Angelo notifications@github.com wrote:

See
https://github.com/angelozerr/angularjs-eclipse/wiki/New-and-Noteworthy-0.5.0#user-content-support-for-controller-without-scope
for more information


Reply to this email directly or view it on GitHub
#71 (comment)
.

@angelozerr
Copy link
Owner Author

It woks like a charm!

Cool! Thank's for having tested this new feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants