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

Uncaught ReferenceError: annyang is not defined #311

Open
einnar82 opened this issue Oct 8, 2017 · 2 comments
Open

Uncaught ReferenceError: annyang is not defined #311

einnar82 opened this issue Oct 8, 2017 · 2 comments

Comments

@einnar82
Copy link

einnar82 commented Oct 8, 2017

Good day,

I currently working in AnnyangJS. But when i link the cdn of annyang and used this syntax,
`<script>
if (annyang) {
// Let's define a command.
var commands = {
'hello': function() { alert('Hello world!'); }
};

// Add our commands to annyang
annyang.addCommands(commands);

// Start listening.
annyang.start();
}}
`

It produces an error Uncaught ReferenceError: annyang is not defined,

But i was tried in your website demo, it works.

@dafo
Copy link

dafo commented Oct 13, 2017

Hello @einnar82 ,
I guess you have copied the code example from the demo. Have a look at the "src" attribute of the annyang script. It is
<script src="//cdnjs.cloudflare.com/ajax/libs/annyang/2.6.0/annyang.min.js"></script>
You have to change it to
<script src="https://cdnjs.cloudflare.com/ajax/libs/annyang/2.6.0/annyang.min.js"></script>

I hope this will help you in your project!

@LukeMcLachlan
Copy link

...or source the file locally ;-)

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