File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
addon/ng2/blueprints/directive Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -7,14 +7,24 @@ module.exports = {
77 description : '' ,
88
99 availableOptions : [
10- { name : 'flat' , type : Boolean , default : true }
10+ { name : 'flat' , type : Boolean , default : true } ,
11+ { name : 'prefix' , type : Boolean , default : true }
1112 ] ,
1213
1314 normalizeEntityName : function ( entityName ) {
1415 var parsedPath = dynamicPathParser ( this . project , entityName ) ;
1516
1617 this . dynamicPath = parsedPath ;
17- this . rawEntityName = parsedPath . name ;
18+
19+ var defaultPrefix = '' ;
20+ if ( this . project . ngConfig &&
21+ this . project . ngConfig . apps [ 0 ] &&
22+ this . project . ngConfig . apps [ 0 ] . prefix ) {
23+ defaultPrefix = this . project . ngConfig . apps [ 0 ] . prefix ;
24+ }
25+ var prefix = this . options . prefix ? defaultPrefix : '' ;
26+
27+ this . rawEntityName = prefix + parsedPath . name ;
1828 return parsedPath . name ;
1929 } ,
2030
You can’t perform that action at this time.
0 commit comments