@@ -16,7 +16,9 @@ module.exports = {
1616 { name : 'inline-template' , type : Boolean , aliases : [ 'it' ] } ,
1717 { name : 'inline-style' , type : Boolean , aliases : [ 'is' ] } ,
1818 { name : 'prefix' , type : Boolean , default : true } ,
19- { name : 'spec' , type : Boolean }
19+ { name : 'spec' , type : Boolean } ,
20+ { name : 'view-encapsulation' , type : String , aliases : [ 've' ] } ,
21+ { name : 'change-detection' , type : String , aliases : [ 'cd' ] }
2022 ] ,
2123
2224 beforeInstall : function ( ) {
@@ -68,6 +70,14 @@ module.exports = {
6870 options . spec :
6971 this . project . ngConfigObj . get ( 'defaults.spec.component' ) ;
7072
73+ options . viewEncapsulation = options . viewEncapsulation !== undefined ?
74+ options . viewEncapsulation :
75+ this . project . ngConfigObj . get ( 'defaults.viewEncapsulation' ) ;
76+
77+ options . changeDetection = options . changeDetection !== undefined ?
78+ options . changeDetection :
79+ this . project . ngConfigObj . get ( 'defaults.changeDetection' ) ;
80+
7181 return {
7282 dynamicPath : this . dynamicPath . dir . replace ( this . dynamicPath . appRoot , '' ) ,
7383 flat : options . flat ,
@@ -77,7 +87,9 @@ module.exports = {
7787 route : options . route ,
7888 isAppComponent : ! ! options . isAppComponent ,
7989 selector : this . selector ,
80- styleExt : this . styleExt
90+ styleExt : this . styleExt ,
91+ viewEncapsulation : options . viewEncapsulation ,
92+ changeDetection : options . changeDetection
8193 } ;
8294 } ,
8395
0 commit comments