2016-04-22 22 views

答えて

1

var AppComponent = ng.core 
    .Component({ 
     selector: 'my-app', 
     template: '<div>Test</div>', 
     viewEncapsulation: ng.core.ViewEncapsulation.Native 
    }) 
    .Class({ 
     constructor: function() { 
     (...) 
     } 
    }); 
+0

'ng.core.ViewEncapsulation.Native'は、それが未定義ではないが、動作するようには思えません。 Angular 2はまだネイティブの影DOMを使用する代わりにエミュレートしています –

+0

'viewEncapsulation'の代わりに' encapsulation'にする必要があります。 –

+0

'ViewEncapsulation.Native'の代わりに' ViewEncapsulation.None'を使用してください。 –