AnsweredAssumed Answered

PI Vision Custom Symbols & Angularjs

Question asked by eradwan on Oct 9, 2017
Latest reply on Oct 15, 2017 by eradwan

Hi There,

Is it ok while creating a CS to create an Angular Module and Controller as in this example:

 

https://github.com/osimloeff/PI-Web-API-Client-AngularJS/blob/master/samples/sample_main.js

=============================================================

var app = angular.module("demo-app", ['ngPIWebApi']);  
app.run(function (piwebapi) {
piwebapi.ConfigureInstance("https://marc-web-sql.marc.net/piwebapi", true); });

app.controller("mainCtrl", function ($scope, piwebapi) {

=================================================================

 

I'm asking because in all CS by the community used to start from the scope directly and I thought it must be like this. Even the mentioned example from Github is presented in a different way in this article:

https://pisquare.osisoft.com/community/developers-club/blog/2017/04/10/using-pi-web-api-client-library-in-pi-vision

 

I'm trying to add a Kendo UI Grid to my CS and I find the first method above - creating Module & Controller - more convenient as I can imitate the examples from Telerik, while without them its really annoying to where to plug the code among the different files.

Outcomes