Having trouble integrating an Angular app into Meteor templates
Below is my index.html code snippet:
<body>
</body>
<template name="myIndex">
<section ng-app="myApp" ng-controller="AppController as app">
<div ng-include="'client/index.ng.html'"></div>
</section>
</template>
And here is the corresponding index.js script:
MyIndexRouteController = PreloadController.extend({
'preload': {
'async': ['/js/xxx.js']
},
});
Router.route('/', {
template: 'myIndex',
data: {
env: 'someEnv',
assets: ''
},
controller: MyIndexRouteController,
});
However, despite the router rules executing and the template appearing in the rendered HTML, none of the Angular directives like ng-app
or ng-include
are being initialized.
Any suggestions on how to resolve this issue?