Ask the Expert: Understanding Angular Providers in Service Portal

Lisa Latour
Administrator
Administrator

This session will explore why, when, and how to use Angular Providers in Service Portal. We’ll take a look at the anatomy of services and directives, analyze some out-of-box examples, and build a few from scratch.

FEATURED SPEAKER

Jeff Pierce is an eight year (2010) veteran of building portals and custom applications on the ServiceNow platform. He has a passion for user experience, front-end development, and agile methodology. He is the Portal Practice Manager at Cerna Solutions, and currently resides in Honolulu where he plays with ukuleles, clay, and bonsai trees.

Join us HERE to watch the on demand video and post your questions  below - No Registration Required.

And Please Let our Experts know how they've helped! Comment Below!

Like, Share, Mark Helpful.   Find More Events on the Community!

 
originally recorded - Tuesday May 1, 2018

1 ACCEPTED SOLUTION

jpierce_cerna
Tera Contributor

For those looking for the scripts used in this session, here they are:

Free Angular Provider Templates

Aloha,
Jeff

View solution in original post

17 REPLIES 17

Lisa Latour
Administrator
Administrator

We love feedback - please take this short survey to tell us what you think

Lisa Latour
Administrator
Administrator

Chris Czerniak​ asks.. How did you bring up the controller data on google debugger?

quick way to see angular scope data is to do this:

1. select an element in your page, right-click and click Inspect.

2. then when the developer tools comes up, select the console tab, and type angular.element($0).scope().

3. The above will give the scope of the currently selected element.

4. if you want the scope of the current widget, you may have to navigate the $parent objects in your object to get to the widget scope. or, look for your widget in the html elements tab and select it, then type the above in your console to get straight to the scope of the selected element, which would be your widget.

Hint: in the html markup, widgets will generally look something like this:

<div id="xb9f86f98db690300ff4975131f9619c4" class="va167a398db690300ff4975131f9619a7 ng-scope" data="data" options="options" widget="widget" server="server">

I know this is an old comment, but for someone stumbling here in future, one could also find a couple of Context Menus stating

"Log to Console $scope" and "Log to Console $scope.data" when one CTRL + Right_Clicks on the widget instance in Portal.

-Mandar