In my Ionic project, I have multiple HTML template files. Here is an example:
$stateProvider
.state('home', {
url: '/',
templateUrl: 'home.html',
controller: 'HomeController'
})
The JavaScript code in the main HTML file (index.html
) works fine and includes home.html
, but it doesn't seem to work within home.html
<ion-view title="Home">
<ion-content>
<script type="text/javascript">console.log('abc')</script>
</ion-content>
</ion-view>
Any suggestions on how to resolve this issue?