Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
kolaricb
Posts: 9
Registered: ‎09-11-2011
My Device: Z10
Accepted Solution

AngularJS

Image not showing in ng-repeat, getting all data from indexeddb and binding to page everything show up expect img in blackberry 10 webworks.

 

<img data-ng-src='{{item.Picture}}'width="100px;"height="100px;"/>   {
    id:48758,
    Botanical_name:"Cladothamnus pyroliflorus",
    Common_name:"Himalayan Cotoneaster ",
    Picture: "images/Fplants/Cladothamnus pyroliflorus.png",
    },...

 

New Contributor
kolaricb
Posts: 9
Registered: ‎09-11-2011
My Device: Z10

Re: AngularJS

when i run in browser images show up

Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: AngularJS

were you able to resolve this issue?  

 

I'm curious if AngularJS bindings requires absolute HTTP URLs. When packaged images are resolved in a WebWorks app, their relative path is local:///path/to/image.png 

 

Can you connect web inspector and see what errors (if any) you get when trying to render that view?

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
kolaricb
Posts: 9
Registered: ‎09-11-2011
My Device: Z10

Re: AngularJS

i resolove issue by adding 64 sting image, but thet is not sulution for me becouse i have to convert 1500 images.

i conected to web inspector and don't getting any errors

New Contributor
kolaricb
Posts: 9
Registered: ‎09-11-2011
My Device: Z10

Re: AngularJS

actualy i geting this error GET unsafe:local:///plants/Adiantum%20raddianum.jpg Unhandled Protocol

Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: AngularJS

This looks like a limitation of angular.js.  it does not support the "local:" protocol

 

https://github.com/driftyco/ionic/issues/1066

 

According to that issue, you can manually edit ionic.bundle.js and add "local" to the list of supported protocols in the imgSrcSanitizationWhitelist function.

 

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
kolaricb
Posts: 9
Registered: ‎09-11-2011
My Device: Z10

Re: AngularJS

Thank you Stanley

 

SrcUrls have to be whitelistet;

 

app.config(['$routeProvider','$compileProvider',function($routeProvider, $compileProvider){        $compileProvider.imgSrcSanitizationWhitelist('img/');