0

I was using this angularjs tooltip library to show tooltips.

Here's my HTML:

<span tooltips tooltip-title="Recommenders" tooltip-show-trigger="click" tooltip-view="/static/templates/tooltips/recommenders.html" tooltip-view-ctrl="FeedCtrl"></span>

Here's my tooltip partial:

<div ng-repeat="recommender in recommenders_list">
    {{recommender}}
</div>

The problem I am facing is that when I update the 'recommenders_list' array in my controller, the same is not reflected in the tooltip template. How can I update my tooltip partial?

Tarun Dugar
  • 8,921
  • 8
  • 42
  • 79
  • your main module has the dependency of the tooltip library? usually for something like that i create a new directive that return the template by url. this directive is inside on the same module of my controller – Giovanni Far Sep 29 '15 at 11:52
  • yes it has the dependancy. Can you please provide a plunker? That would really help! – Tarun Dugar Sep 29 '15 at 11:53

1 Answers1

0

mainFile

'use strict';

angular.module('yourAppName')
    .controller('ControllerName', ['$scope', function (scope) {

        // ...
        // here your list
        // ...
    }]);

directiveFile

angular.module('yourAppName')
    .directive('directiveName', function() {
        return {
            templateUrl : 'url/of/your/template.html'
        };
    });

htmlFile

<body ng-app="yourAppName">

    <div class="container-fluid" ng-controller="ControllerName">
        <div directive-name></div>
    </div>

    <!-- Angular file -->
    <script src="js/angular.min.js"></script>
    <!-- Angular mainFile -->
    <script src="url/of/your/mainFile.js"></script>

</body>

look at this example, is really basic but in this way i hope you can understand and find where could be your problem.

Giovanni Far
  • 1,623
  • 6
  • 23
  • 37