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 = {
7
7
description : '' ,
8
8
9
9
availableOptions : [
10
- { name : 'flat' , type : Boolean , default : true }
10
+ { name : 'flat' , type : Boolean , default : true } ,
11
+ { name : 'prefix' , type : Boolean , default : true }
11
12
] ,
12
13
13
14
normalizeEntityName : function ( entityName ) {
14
15
var parsedPath = dynamicPathParser ( this . project , entityName ) ;
15
16
16
17
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 ;
18
28
return parsedPath . name ;
19
29
} ,
20
30
You can’t perform that action at this time.
0 commit comments