I am developing a simple application using 4.16 - quite a bit different from the old 3.x stuff, so I'm still getting used to it. The additional libs/etc. I am using are bootstrap, jQuery & jQueryUI.
What I am trying to do is have a simple map displayed in a bootstrap grid using the first 11 columns and a series of buttons in the remaining column each of which will open another widget, each in its own jQueryUI dialog.
I have successfully, to an extent, (pun fully intended) managed to bring in basemap gallery, Sketch and Measure widgets (the Measure widget can be finicky, more on this later) and so I thought I'd try Bookmarks.
It successfully load the widget into the dialog and displays it but when I try to add the first bookmark the app displays a never ending whirlygig icon with the message "Adding bookmark." adjacent to it.
And checking the developer tools displays the error:
Uncaught (in promise) TypeError: can't access property "add", b.viewModel.bookmarks is undefined
This happens every time without fail in both firefox developer edition and chrome
(latest versions of each).
I have also experienced the same sort of error using the Measurement widget but that is intermittent and shows up usually after having done several successful measure actions.
Presently I am using only a single html page for the application just to keep things simple. The environment is Visual Studio Community Edition 2019. I've attached the code for anyone to have a look at.
Any suggestions would be helpful!