I am currently porting a Javascript "app" into AngularJS and one part of this app would be too long to recode.
What I would like to do is to use a simple javascript instruction like alert("message") within the ionic sideMenu sample available here : http://ionicframework.com/getting-started/
I already tried by including this into indext.html as well as in search.html but nothing would help
<script src="js/test.js" type="text/javascript"></script>
This is my test.js (I get no output for the console.log neither)
function test()
{
console.log('test');
alert("Secon test");
}
test(); //first method for calling the function, won't work
And calling it within an attribute won't work neither :
<ion-content class="has-header" scroll="false" onload="test()">
Could you please tell me why this is not working and how to fix it? Thank you in advance
As mentioned Lucuma : Ionic uses angular so this should be included inside a controller.