Phoenix Framework and AngularJS templates

E

etphoneshome

Guest
How can I load AngularJS templates from a Phoenix framework application? I am using the ui-router to load a template using templateUrl. This is with angular 1.5.

myAppModule.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', function ($stateProvider, $urlRouterProvider, $httpProvider) {

$stateProvider
.state('event', {
url: '/event',
templateUrl: '/templates/event/event.html'
// template: '<h1>Stuff</h1>'
})


$urlRouterProvider.otherwise('/event');
}]);


Loading an inline template works, so it is clearly the mechanism for loading templates which I am struggling with. Are there any settings in the brunch config I need to change?

Thank you

Eamon

Continue reading...
 
Top