Forum - customization by angularJS(Find controllers)

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #35248
    Anonymous
    Inactive

    Hi
    I am editing custome.js with angularJS. I noticed there’s many ‘controllers’ in it.Each controller has its own data.
    But for now I have to view and find the ‘controllers’ in console view of web browser.It’s little inconveniences.
    I want to know if there’s any documentation that I can find all supported controllers? such as:

    Parent Controller – prmSearchResultAvailabilityLine
    parentCtrl.result.pnx.control.sourcerecordid[0] – MMSID
    etc.

    Parent Controller – prmLoginHelp
    parentCtrl.loginHelpService._loginHelpData.moreInfo – Sign-in Help Text
    etc….

    Parent Controller – prmLocations
    parentCtrl.results[0][0].location.callNumber – Item Call Number
    parentCtrl.results[0][0].availability – Item Avaliability
    parentCtrl.results[0][0].additionalData.mainlocationname – Main Location Name
    etc….

    Parent Controller – prmGalleryCollectionsList
    parentCtrl.collections[0].name – Collection Title
    parentCtrl.collections[0].pid.value – Collection ID
    etc….

    Thank you.

    #39855
    Beijing Normal University 86BNU_INST
    Participant

    Hi Is there any comments or advise?

    #51696
    Macau University of Science and Technology 853MUST_INST
    Participant

    any updates?

    #51697
    Ori Miller
    Keymaster

    Hi,
    Unfortunately, there isn’t such documentation that can tell exactly what each parameter means.
    The only thing that available now is the showDirectives script that provided in primo-explore-package GitHub repository (https://github.com/ExLibrisGroup/primo-explore-package/blob/master/VIEW_CODE/showDirectives.txt) which can tell you what components are free to use by the customization package.
    Regards,
    Gilad

    #64054
    Mehmet Celik
    Participant

    Not sure if you are still struggling with this but have a look at https://github.com/mehmetc/primo-explore-dom
    It will popup a window with all the active components and you can drill down 2 levels into the component.
    Here is a snippet to load the window from the console. It works in 2 steps first you need to enable debug and after the screen is reloaded enter the second part

    //enable debug information. Wait for the screen to reload.
    angular.reloadWithDebugInfo();

    //When screen is reloaded
    //Get a pointer to AngularJs and angularLoad
    var appInjector = angular.injector([‘ng’,’angularLoad’]);
    //Get a reference to angularLoad
    var angularLoad = appInjector.get(‘angularLoad’);
    //Load the script;
    angularLoad.loadScript(‘https://npmcdn.com/primo-explore-dom/js/primo-explore-dom.js’).then(function(){
    console.log(‘script loaded’);
    });

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.