Alek Hurst
Alek Hurst

Reputation: 4863

Angular template only loading from root directory in MeteorJS

I am new to meteor, and after the tutorial have decided to migrate one of my MEAN stack applications to meteor. The problem I'm having is that the exact same angular route works when the location of the template file is in the root directory, but then does not work when I put it a different one.

This one works:

$stateProvider
  .state('winery_selection', {
    url: '/',
    templateUrl: 'winery_selection.ng.html',
    controller: 'WinerySelectionController',
  })

This one does not pick up the template at all:

$stateProvider
  .state('winery_selection', {
    url: '/',
    templateUrl: '/client/app/views/winery_selection.ng.html',
    controller: 'WinerySelectionController',
  })

The only thing I have changes is the location of the file and this line of code, respectively.

Any thoughts on why it only works from the root directory?

Upvotes: 1

Views: 245

Answers (1)

Pankaj Parkar
Pankaj Parkar

Reputation: 136194

Looks like you need to remove starting \ from URL

templateUrl: 'client/app/views/winery_selection.ng.html'

Upvotes: 1

Related Questions