Workflow and ServiceDesk Community

 View Only

Workflow - AngularJS Components 

Sep 04, 2017 02:27 AM

In this series of Articles I will run through using the new AngularJS Components in Workflow Workflow.

Angular Logo https://angularjs.org/

(Not to be confused with https://angular.io/)

If you are unfamiliar with AngularJS there are lots of resources available to learn this framework.

 

Many thanks to Symantec Logo BCason for some examples on this.

 

Table Of Contents

 

Symantec™ Workflow 8.1 Release Notes
https://support.symantec.com/en_US/article.DOC9624.html

pg7

Feature Description 
Enhanced ability to design Workflow forms. Enhanced ability to design forms with the latest Kendo user interface capabilities that AngularJS provides.
Added Show AngularJS Components check box at the global project to turn on or turn off the AngularJSComponents support. 

 

Protirus.png

Statistics
0 Favorited
5 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Jul 16, 2018 01:32 AM


Using Components

Now that we know how to create components, let's refactor the HTML page to make use of our newly acquired skill.


app/index.html:

<html ng-app="phonecatApp">
<head>
  ...
  <script src="bower_components/angular/angular.js"></script>
  <script src="app.js"></script>
  <script src="phone-list.component.js"></script>
</head>
<body>

  <!-- Use a custom component to render a list of phones -->
  <phone-list></phone-list>

</body>
</html>

app/app.js:

// Define the `phonecatApp` module
angular.module('phonecatApp', []);

app/phone-list.component.js:

// Register `phoneList` component, along with its associated controller and template
angular.
  module('phonecatApp').
  component('phoneList', {
    template:
        '<ul>' +
          '<li ng-repeat="phone in $ctrl.phones">' +
            '<span>{{phone.name}}</span>' +
            '<p>{{phone.snippet}}</p>' +
          '</li>' +
        '</ul>',
    controller: function PhoneListController() {
      this.phones = [
        {
          name: 'Nexus S',
          snippet: 'Fast just got faster with Nexus S.'
        }, {
          name: 'Motorola XOOM™ with Wi-Fi',
          snippet: 'The Next, Next Generation tablet.'
        }, {
          name: 'MOTOROLA XOOM™',
          snippet: 'The Next, Next Generation tablet.'
        }
      ];
    }
  });

Related Entries and Links

No Related Resource entered.