(element: Element, keepNgReflect = false)
| 244 | } |
| 245 | |
| 246 | function toHtml(element: Element, keepNgReflect = false): string { |
| 247 | if (element) { |
| 248 | let html = stringifyElement(element); |
| 249 | |
| 250 | if (!keepNgReflect) { |
| 251 | html = html |
| 252 | .replace(/\sng-reflect-\S*="[^"]*"/g, '') |
| 253 | .replace(/<!--bindings=\{(\W.*\W\s*)?\}-->/g, ''); |
| 254 | } |
| 255 | |
| 256 | html = html |
| 257 | .replace(/^<div host="">(.*)<\/div>$/, '$1') |
| 258 | .replace(/^<div fixture="mark">(.*)<\/div>$/, '$1') |
| 259 | .replace(/^<div host="mark">(.*)<\/div>$/, '$1') |
| 260 | .replace(' style=""', '') |
| 261 | .replace(/<!--container-->/g, '') |
| 262 | .replace(/<!--ng-container-->/g, ''); |
| 263 | return html; |
| 264 | } else { |
| 265 | return ''; |
| 266 | } |
| 267 | } |
no test coverage detected
searching dependent graphs…