Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (36 sloc) 840 Bytes

View Example

Install Scripts

NPM: npm install entity-signal or download from GitHub

Add Javascript Files To Html After SignalR

<script src="https://cdn.jsdelivr.net/npm/@aspnet/signalr@1.1.2/dist/browser/signalr.min.js"></script>
<script src="~/dist/entitySignal.js"></script>

Connect to Server

var client = new EntitySignal.Client();
client.connect();

Create Vue Data Object

var data = {
  messages: null,
  client: client
};

Sync With Endpoint

client.syncWith("/subscribe/SubscribeToAllMessages")
  .then(x => {
    data.messages = x;
  });

Set Vue Data Object

new Vue({
  el: '#test-vue-app',
  data: data,
});
You can’t perform that action at this time.