image - How to use img ng-src in AngularJS on android phone? -


Most relevant Q & amp; I have got and I have read.

I am trying to use it in my app and I saw that the demo uses the full URL for the slide like this: image: 'http: //placekitten.com/ '+ NewWidth +' / 300 '.

This works on my localhost (Mac), but I do not think the images (slides) are on my Android Google Nexus phone because I only use such image paths like this: Code> image: '/images/help/hello-1.jpg' .

How can I use the image path associated with an http: // without ng-src instructions on an Android phone? My HTML:

<<< p> $ location is the possible solution ()?

  & lt; Div ng-controller = "helloCtrl" class = "slide-container" & gt; & Lt; Div & gt; & Lt; Carousel Interval = "My Interval" & gt; & Lt; Slide ng-repeat = "slide in slide" active = "slides. Active" & gt; & Lt; Img ng-src = "{{slide.image}}" style = "margin: auto;" & Gt; & Lt; Div class = "carousel-caption" & gt; & Lt; H3 & gt; {{Slide.headline}} & lt; / H3 & gt; & Lt; P & gt; {{Slide.text}} & lt; / P & gt; & Lt; A ng-href = "mailto: help@help.com? Topic = help-check" class = "menu_button" & gt; & Lt; P & gt; Contact us & lt; / P & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; / Slide & gt; & Lt; / Carousel & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

My JS:

  'Strict use'; Var app = angular Module ('hello'); App.controller ('helloCtrl', function ($ scope) {$ scope.slides = [{Image: '/images/hello-1.jpg', Title: 'Help1', text: 'Advertising on the website, presentations Adipisic. '}, {Image:' /images/hello-2.jpg ', Title:' Help 2 ', Text:' Article android developers etate, Ardictor adipisition elite, sed do. '}];});  

For some reason I do not use a file path with many such directories Can image: '/images/hello-1.jpg' in my JS.

New html:

  ... & Lt; Img ng- src = "picture / {{slide.image}}" style = "margin: auto;" & Gt; ...  

New JS:

  ... {image: 'Hello -1 Jpg ', ....}, {Image:' hello-2.jpg ', ...} ...  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -