slushjs / slush-angular

A slush generator for AngularJS using the Google Angular App Structure Recommendations
129 stars 32 forks source link

template URL for example todo app incorrectly set #51

Closed tkothe closed 8 years ago

tkothe commented 8 years ago

I just generated my first app (let's call it myApp) with slush-angular. I was surprised I did not see the todo app that the generator asked me for. Here's how the app.js looked like after the slush generator finished:

angular.module('myApp', [
  'ngRoute',
  'myApp.todo'
])
.config(function ($routeProvider) {
  'use strict';
  $routeProvider
    .when('/todo', {
      controller: 'TodoCtrl',
      templateUrl: '/myApp/todo/todo.html'
    })
    .otherwise({
      redirectTo: '/todo'
    });
});

and here's what I had to change it to, in order to get the todo app on the screen (hint: I had to remove myApp from the templateUrl)

angular.module('myApp', [
  'ngRoute',
  'myApp.todo'
])
.config(function ($routeProvider) {
  'use strict';
  $routeProvider
    .when('/todo', {
      controller: 'TodoCtrl',
      templateUrl: '/todo/todo.html'
    })
    .otherwise({
      redirectTo: '/todo'
    });
});

After that it worked as expected.

I currently don't have the time to dig into slush-angular in order to fix this myself, but this should really only be a minor issue.

tkothe commented 8 years ago

It might be as easy as removing /<%= nameDashed %> here. But someone who knows something about this should double check :smile:

joakimbeng commented 8 years ago

Fixed by #50

tkothe commented 8 years ago

ooops - didn't see that :smile: thanks!