如何在方法 Renderer2.addClass() 上添加多个类;
例子:
this.renderer.addClass(this.el.nativeElement, 'btn btn-primary')
当我尝试这样做时,我得到了错误:
ERROR DOMException: Failed to execute 'add' on 'DOMTokenList': The token provided ('btn btn-primary') contains HTML space characters, which are not valid in tokens.
at EmulatedEncapsulationDomRenderer2.addClass