Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Commit b4f367e

Browse files
SplaktarCaerusKaru
authored andcommitted
docs(readme): fix syntax highlighting (#107)
1 parent 9090fa5 commit b4f367e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The following sections covers the three different configurations of preboot:
2929

3030
#### Angular Configuration
3131

32-
```typescript
32+
```ts
3333
import { NgModule } from '@angular/core';
3434
import { BrowserModule } from '@angular/platform-browser';
3535
import { PrebootModule } from 'preboot';
@@ -116,7 +116,7 @@ yourself once you know that all async events are complete.
116116

117117
To manually trigger replay, inject the EventReplayer like this:
118118

119-
```
119+
```ts
120120
import { Injectable } from '@angular/core';
121121
import { EventReplayer } from 'preboot';
122122

@@ -176,7 +176,7 @@ Preboot registers its reply code at the `APP_BOOTSTRAP_LISTENER` token which is
176176

177177
To make Preboot work correctly in such a case you need to specify `replay: false` in the Preboot options and replay the events yourself. That is, import `PrebootModule` like this:
178178

179-
```typescript
179+
```ts
180180
PrebootModule.withConfig({
181181
appRoot: 'app-root',
182182
replay: false,
@@ -185,7 +185,7 @@ PrebootModule.withConfig({
185185

186186
and replay events in `AppComponent` like this:
187187

188-
```typescript
188+
```ts
189189
import { isPlatformBrowser } from '@angular/common';
190190
import { Component, OnInit, PLATFORM_ID, Inject, ApplicationRef } from '@angular/core';
191191
import { Router } from '@angular/router';
@@ -226,7 +226,7 @@ When you are manually replaying events, you often will want to know when Preboot
226226
is done replaying events and switching the buffers. To do this, use the following
227227
code in your app:
228228

229-
```
229+
```es6
230230
window.document.addEventListener('PrebootComplete', () => {
231231
// put your code here that you want to run once preboot is complete
232232
});
@@ -238,7 +238,7 @@ If you're using a CSP, you'll need to add a `nonce` property to preboot's inline
238238
Preboot allows you to configure this by exporting an optional `PREBOOT_NONCE` token.
239239
Example usage is as follows (for an Express server):
240240

241-
```typescript
241+
```ts
242242
import {PREBOOT_NONCE} from 'preboot';
243243
import * as express from 'express';
244244
import {v4} from 'uuid';
@@ -283,7 +283,7 @@ Please note that only the nonce tag will appear on the script,
283283
sure your nonce is generating correctly, you can add a callback
284284
onto your render method to examine the resultant HTML as follows:
285285
286-
```typescript
286+
```ts
287287
res.render('index', (req, res) => {
288288
...
289289
}, function(error, html) {

0 commit comments

Comments
 (0)