diff --git a/README.md b/README.md index 9b227c1..7ecf092 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ angular.module("my-module").component("my-component", { #### After (before it is bundled into your webpack'd application) ```js angular.module("my-module").component("my-component", { - template: require('/root/some/path/app/src/myComponent.html" , + template: require('/root/some/path/app/src/myComponent.html").default, controller: "MyController" }); ``` diff --git a/index.js b/index.js index 47c884a..4dad8aa 100644 --- a/index.js +++ b/index.js @@ -15,7 +15,7 @@ function replaceStringsWithRequires(string, relativeTo) { url = "./" + url; } if (os.platform() === "win32") url = url.replace(/\\/g, '\\\\'); - return "require('" + url + "')"; + return "require('" + url + "').default"; }); }