ericclemmons / grunt-angular-templates

Grunt build task to concatenate & pre-load your AngularJS templates
MIT License
710 stars 107 forks source link

Doesn't include some templates with grunt build. #152

Closed uranus86 closed 7 years ago

uranus86 commented 8 years ago

Hi, I got an issue with ng-template. it's doesn't include some templates.

my routes code here:

$stateProvider.state('home', {
  abstract: true,
    url: '/home',
    views: {
    'header': {
      controller: 'HeaderCtrl',
      templateUrl: 'layout/header.html'
    },
    '': {
        templateUrl: 'home/main.html',
    },
    'footer': {
        controller: 'FooterCtrl',
        templateUrl: 'layout/footer.html'
    }
   }        
})
.state('home.detail', {
  url: '',
    views: {
        'home' : {
            templateUrl: 'home/home.html',
            controller: 'HomeCtrl'              
        },
        'clients' : {
            templateUrl: 'clients/clients.html',
            controller: 'ClientsCtrl'               
        }
 ...
}

so the home page would be include multiple views like home, clients, etc more.

my grunt script here:

ngtemplates: {
      dist: {
        options: {
          htmlmin: '<%= htmlmin.dist.options %>',
          usemin: 'assets/js/main.js'
        },
        cwd: '<%= yeoman.app %>',
        src: ['{,*/}*.html','!<%= yeoman.app %>/index.html'],
        dest: '.tmp/templateCache.js'
      }
    },

so after grunt build, in the templateCache.js file doesn't includes for home.html and clients.html..

Hope to help for those.

underscorebrody commented 8 years ago

@tiemin would you mind running the command with --verbose? I'm wondering if there might be a problem with the globbing pattern on your src for the ngtemplates config.

portus84 commented 7 years ago

+1