Webview does't load local javascript files



I just created new angular project with the following structure. In the items.component.html file i created a webview:

<WebView row="1" #webview (loaded)="onWebviewLoaded(webview)" width="320" height="400" 
    borderWidth="5" borderColor="black" src="~/item/www/index.html"></WebView>

Then in the www folder i created the javascript files with the following structure:
www -> index.js
When i run the app, i check in safari (inspect webview), the index.js file isn’t loading…I added index.js file as following in the index.html:

    <script src="./index.js"></script>

But i get following error:

Failed to load resource: The operation couldn’t be completed. Operation not permitted

It turns out simple javascript doesn’t work also…Check the nativescript playground: