1

I am following the AngularJS-UI tutorial and just about the first example I stuck.

I am trying to use a simple tooltip, I have included all js files needed but an exception is thrown by anglularJS-ui module says there is no function called tooltip exists. I Also included the 'ui' module in my main module but, still not working.

Error: ui-jq: The "tooltip" function does not exist
    at Object.compile (http://localhost:8080/js/lib/angular/ui/angular-ui.js:452:15)
    at applyDirectivesToNode (http://localhost:8080/js/lib/angular/angular.js:4047:32)
    at compileNodes (http://localhost:8080/js/lib/angular/angular.js:3794:14)
    at compileNodes (http://localhost:8080/js/lib/angular/angular.js:3799:14)
    at compileNodes (http://localhost:8080/js/lib/angular/angular.js:3799:14)
    at compileNodes (http://localhost:8080/js/lib/angular/angular.js:3799:14)
    at compileNodes (http://localhost:8080/js/lib/angular/angular.js:3799:14)
    at compileNodes (http://localhost:8080/js/lib/angular/angular.js:3799:14)
    at compile (http://localhost:8080/js/lib/angular/angular.js:3739:29)
    at http://localhost:8080/js/lib/angular/angular.js:932:9 <a title="ahaaaaaaaa" ui-jq="tooltip" href=""> 
enter code here

thanks in advance for help.

2 Answers 2

2

The problem was in the order of including js files. I am new to JS in general. This was the problem. If you have A.js -> depends on B.js -> depends on C.js. You have to include js like this

<script type="text/javascript" src="C.js"></script>
<script type="text/javascript" src="B.js"></script>
<script type="text/javascript" src="A.js"></script>
Sign up to request clarification or add additional context in comments.

Comments

1

The error message means that you set up angularjs-ui and the 'ui' module correctly (as the ui-js directive was understood by the Angularjs compiler), but the reference to angular-ui.js is not set up correctly.

You could try $('body') and $('body').tooltip() in the developer console to check whether jquery.js and jquery-ui.js is included correctly.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.