答案 0 :(得分:0)
设置PHP标头:
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
您可能还需要在HTML中设置元标记:
import {Directive, Attribute} from 'angular2/core';
@Directive({
selector: 'foo'
})
export class foo {
constructor(@Attribute('checked') checked: string) {
if (checked === null){
//checked is not present
}else{
//checked is present
}
...
}
....
}
我希望这会有所帮助。