Skip to content

Commit 174e46c

Browse files
committed
feat(gen:route): add instructions for using route after generated
1 parent 28ce6c4 commit 174e46c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/generators/route/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ class Generator extends Base {
3737
this.htmlUrl = relativeUrl(basePath, path.join(this.dir, `${this.name}.${this.templateExt}`));
3838
copyTemplates(this, 'route');
3939
}
40+
41+
end() {
42+
this.log(`
43+
In the parent of this component, you should now import this component and add it as a dependency:
44+
45+
import ${this.classedName}Component from './${this.name}/${this.name}.component';
46+
...
47+
export angular.module('myParentModule', [${this.classedName}Component]);`);
48+
}
4049
}
4150

4251
module.exports = Generator;

0 commit comments

Comments
 (0)