-
Notifications
You must be signed in to change notification settings - Fork 90
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
Automatic link between HTML template & controller #102
Comments
That would be really nice but also quite complex to implement because there are different situation :
Here we need to parse the
There are probably other ways to bind controllers to template which I'm not aware of. |
I know it's not an easy task (taht's why I had implemented link 'at hand'). But I would like to really improve (at first) templateUrl with this issue but with the following issue #103 (completion for templateUrl). But to do that I need that tern support object litteral with clean mean (pay the author of tern.js to support that?) |
@sebastienblanc I will start this feature but I will manage for the moment 2 cases :
app.directive("zippy", function(){
return {
restrict: "E",
transclude: true,
scope: {
title: "@"
},
templateUrl: "zippy.html",
link: function(scope){
scope.isContentVisible = false;
scope.toggleContent = function(){
scope.isContentVisible = !scope.isContentVisible;
};
};
};
});
$routeProvider.when('/contacts', {
templateUrl : 'partials/contact/search.html',
controller : SearchContactController $stateProvider is not a part of angular, but an extension (so I will not manage it for the moment). I have created an issue for that #137 |
See https://thinkster.io/egghead/templateurl/ for a sample with templateUrl.
When templateUrl is used, today link between HTML file and JS controller is done at hand https://github.com/angelozerr/angularjs-eclipse/wiki/Angular-Explorer-View#user-content-html-template-linkunlink
It should be cool if tern plugin angular.js could retrieve the link between HTML template and controller : link will be done automaticly without doing at hand.
The text was updated successfully, but these errors were encountered: