Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add syntax highlighting to Vue template examples #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ In order to get the integration between your Vue's application and PubNub, PubNu

**PubNubVue** must be installed like a plugin.

```
```js
import Vue from 'vue';
import PubNubVue from 'pubnub-vue';
import App from './App';
Expand All @@ -44,7 +44,7 @@ new Vue({
Use the hook mounted to subscribe channels using **$pnSubscribe** method


```
```js
export default {
name: 'app',
mounted() {
Expand Down Expand Up @@ -95,7 +95,7 @@ export default {
</tr>
</table>

```
```js
<template>
<div id="app">
<ol>
Expand Down Expand Up @@ -123,7 +123,7 @@ export default {
**pnGetMessage** will receive a second parameter which is a callback function that is going to be invoked as soon as received a new
real time message. This will allow to apply a transformation or manipulate of somehow to each message or implement a custom mechanism to render these.

```
```js
<template>
<div id="app">
<ol>
Expand Down Expand Up @@ -185,7 +185,7 @@ export default {
</tr>
</table>

```
```js
<template>
<div id="app">
<ol>
Expand Down Expand Up @@ -244,7 +244,7 @@ export default {
</tr>
</table>

```
```js
<template>
<div id="app">
{{ category }}
Expand Down Expand Up @@ -303,7 +303,7 @@ export default {
</tr>
</table>

```
```js
<template>
<div id="app">
...
Expand Down Expand Up @@ -357,7 +357,7 @@ export default {
</tr>
</table>

```
```js
this.$pnUnsubscribe({ channels: ['ch1'] });
```

Expand Down Expand Up @@ -387,7 +387,7 @@ this.$pnUnsubscribe({ channels: ['ch1'] });
</tr>
</table>

```
```js
this.$pnClean('ch1');
```

Expand Down Expand Up @@ -417,19 +417,19 @@ this.$pnClean('ch1');
</tr>
</table>

```
```js
this.$pnRelease('ch1');
```

## How to access to the original instance

If somehow is neccesary to access to the instance in order to get using all feature given for javascript SDK.

```
```js
let instance = this.$pnGetInstance();
```

```
```js
import PubNubVue from 'pubnub-vue';

const instance = PubNubVue.getInstance();
Expand All @@ -442,7 +442,7 @@ const instance2 = PubNubVue.getInstance('instance2');

The **$pnGetInstance** method will return the main instance which be created by default but if we need to create an additional instance, we can pass as a parameter the name of a new one instance and with this same name, you will have the capability of retrieving from other component inside of our application.

```
```js
<template>
<div id="app">
<ol>
Expand Down