{"action":"created","issue":{"url":"https://api.github.com/repos/karlgoldstein/grunt-html2js/issues/61","labels_url":"https://api.github.com/repos/karlgoldstein/grunt-html2js/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/karlgoldstein/grunt-html2js/issues/61/comments","events_url":"https://api.github.com/repos/karlgoldstein/grunt-html2js/issues/61/events","html_url":"https://github.com/karlgoldstein/grunt-html2js/issues/61","id":54615906,"number":61,"title":"Module names all start with \"../\" ","user":{"login":"germanger","id":2080549,"avatar_url":"https://avatars.githubusercontent.com/u/2080549?v=3","gravatar_id":"","url":"https://api.github.com/users/germanger","html_url":"https://github.com/germanger","followers_url":"https://api.github.com/users/germanger/followers","following_url":"https://api.github.com/users/germanger/following{/other_user}","gists_url":"https://api.github.com/users/germanger/gists{/gist_id}","starred_url":"https://api.github.com/users/germanger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/germanger/subscriptions","organizations_url":"https://api.github.com/users/germanger/orgs","repos_url":"https://api.github.com/users/germanger/repos","events_url":"https://api.github.com/users/germanger/events{/privacy}","received_events_url":"https://api.github.com/users/germanger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-16T19:39:22Z","updated_at":"2015-01-16T20:10:25Z","closed_at":null,"body":"This is the structure of my folder:\r\n\r\n    -index.html\r\n    -Gruntfile.js\r\n    -views (directory)\r\n    -js (directory)\r\n         -controllers (directory)\r\n         -directives (directory)\r\n         -filters (directory)\r\n         -app.js\r\n         -routes.js\r\n\r\nGiven the path relation between my views and my \"index.html\", all views should be called liked this:\r\n\r\n       templateUrl: 'views/some-view.html'\r\n\r\nAnd that is exactly how I call them from my \"routes.js\" and in controllers.\r\nIt works as expected.\r\n\r\nWith that said, now I'm trying to use \"grunt-html2js\".\r\nI've tried the following cases in my Gruntfile.js\r\n\r\nCase 1:\r\n\r\n        html2js: {\r\n            options: {\r\n                module: 'myApp.templates',\r\n            },\r\n            main: {\r\n                src: ['views/*.html'],\r\n                dest: 'views/all-views.js'\r\n            }\r\n        },\r\n\r\nCase 2:\r\n\r\n                src: ['views/*.html'],\r\n                dest: 'all-views.js'\r\n\r\nCase 3:\r\n\r\n                src: ['views/*.html'],\r\n                dest: 'build/all-views.js'\r\n\r\nAnd, in all of the cases, the result is that the name of the generated modules starts with `\"../\"`, eg:\r\n\r\n         angular.module('myApp.templates', ['../views/some-modal.html', '../views/other-modal.html', .... etc\r\n\r\nAs written before: **I don't need those two dots!** \r\nQuestion: ...how can I configure \"grunt-html2js\" correctly?\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/karlgoldstein/grunt-html2js/issues/comments/70314612","html_url":"https://github.com/karlgoldstein/grunt-html2js/issues/61#issuecomment-70314612","issue_url":"https://api.github.com/repos/karlgoldstein/grunt-html2js/issues/61","id":70314612,"user":{"login":"germanger","id":2080549,"avatar_url":"https://avatars.githubusercontent.com/u/2080549?v=3","gravatar_id":"","url":"https://api.github.com/users/germanger","html_url":"https://github.com/germanger","followers_url":"https://api.github.com/users/germanger/followers","following_url":"https://api.github.com/users/germanger/following{/other_user}","gists_url":"https://api.github.com/users/germanger/gists{/gist_id}","starred_url":"https://api.github.com/users/germanger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/germanger/subscriptions","organizations_url":"https://api.github.com/users/germanger/orgs","repos_url":"https://api.github.com/users/germanger/repos","events_url":"https://api.github.com/users/germanger/events{/privacy}","received_events_url":"https://api.github.com/users/germanger/received_events","type":"User","site_admin":false},"created_at":"2015-01-16T20:10:25Z","updated_at":"2015-01-16T20:10:25Z","body":"I solved this way, but is not very elegant, so I hope theres another way:\r\n\r\n            options: {\r\n                rename: function (moduleName) {\r\n                    return moduleName.replace('../', '');\r\n                },\r\n                module: 'myApp.templates',\r\n            },"}}