In this series of Articles I will run through using the new AngularJS Components in Workflow.
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.
Table Of Contents
Symantec™ Workflow 8.1 Release Notes https://support.symantec.com/en_US/article.DOC9624.html
pg7
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.' } ]; } });