Search Posts

Category: image

loading image using anglularjs and ibm bluemix

I developed an application using nodes and angularjs. I have an html file that I should display an image. when running the application on localhost, everything work perfectly and the application displays the image. I used this code for displaying image: <img ng-src=”./app/images/{{idimage}}.jpeg” ></img> when I do a push for this application to ibmbluemix, the console told me that there are a 404 not found error. Any idea please for how displaying image using angulars […]

Pass array of data in angularjs multipart

I have an array of colors and sizes, and some other data like product_name and images, I am able to send image files and product_name but when I attach color_and_sizes array then it says 500 error Here is my Code :(Angularjs and Laravel Controller ) Basically I want to save all the details in the database but I am unable to save the color and sizez details. $scope.admin_add_product=function(){ var product_name=$scope.txtProductname; var product_description=$scope.tarDescription; var price=$scope.txtprice; var […]

AIESEC logo instead of the designated logo

Recently, we renamed the logo of our angular application (website) from something_else.png to logo.png. Most of the times it appears fine. However, at least on three different instances (where users were on three different internet connections), the users have reported that instead of the logo of the website they see the logo of AIESEC. When they reload the page or view the page in Chrome incognito, the logo comes back to normal. The Logo is […]

adding dynamic image to table column does not work in angularjs

I’m new to angulajs and I’m trying to dynamically add image to a column when user selects it. Here is the below code and it did not work. code in .cshtml file — <table> <tr> <td> <img ng-src=”{{path}}” /> <input type=”file” ng-model=”path” /> </td> </tr> </table> Code in angularjs file $scope.path = “”; I came across 1 example but written in jquery and this what exactly i need it. http://jsfiddle.net/dwebexperts/4FGg8/1/ Thanks Source: AngularJS

How to strip off formatting in Quill image editor

Currently quill editor will save the image in base64 image. That is fine for now. But how do I make sure quill save the base64 content only and without those formatting? This is how it would like after the image has been saved in the db. <p><img src=”data:image/png;base64,iVBXXXXXXXXXXXXXXXXXXXXXXXXXXX”></p> Basically I want to strip off “< p >” and < img src= tags. I would like to retain data:image/png;base64,iVBXXXXXXXXXX only. Is there any setting that I […]

AngularJs – Getting value of ng-src attribute in controller function

I am working on browse and upload image functionality in my AngularJs application. I am using ng-image-compress for compressing image. I need to access a value of ng-src attribute in my controller whenever user selects an image from browse file dialog. <input id=”File1″ type=”file” accept=”image/*” image=”image1″ ng-image-compress ng-model=”image2″ resize-max-height=”800″ resize-max-width=”800″ resize-quality=”0.7″ resize-type=”image/jpg” onchange=”angular.element(this).scope().uploadPhoto()” /> <br /><br /> <img ng-src=”{{image1.compressed.dataURL}}” class=”thumb” /> using above code, when I selects image, uploadPhoto() method called and selected image displays […]

Rotate image with center point in javascript

Here is my javascript code sliderCtrlPtr.GetsliderStyle = function () { if(sliderCtrlPtr.sliderParams != undefined) { var styleObj = sliderCtrlPtr.sliderParams; var canvas = document.getElementById(“canvas”); var ctx = canvas.getContext(“2d”); var backgroundHeight = styleObj[“styleMapping”][“2”][“StyleMappingCollection”][“636422818932601231”][“height”]; var backgroundWidth = styleObj[“styleMapping”][“2”][“StyleMappingCollection”][“636422818932601231”][“width”]; var backgroundTop = styleObj[“styleMapping”][“2”][“StyleMappingCollection”][“636422818932601231”][“top”]; var backgroundLeft = styleObj[“styleMapping”][“2”][“StyleMappingCollection”][“636422818932601231”][“left”]; var startPointLeft = styleObj[“styleMapping”][“2”][“StyleMappingCollection”][“636422818932601231”][“PointPositioninData”][“startPointCanvasLeftInPercentage”]; var startPointTop = styleObj[“styleMapping”][“2”][“StyleMappingCollection”][“636422818932601231”][“PointPositioninData”][“startPointCanvasTopInPercentage”]; var pivotPointLeft = styleObj[“styleMapping”][“2”][“StyleMappingCollection”][“636422818932601231”][“PointPositioninData”][“pivotPointCanvasLeftPositionInPercentage”]; var pivotPointTop = styleObj[“styleMapping”][“2”][“StyleMappingCollection”][“636422818932601231”][“PointPositioninData”][“pivotPointCanvasTopInPercentage”]; var endPointLeft = styleObj[“styleMapping”][“2”][“StyleMappingCollection”][“636422818932601231”][“PointPositioninData”][“endPointCanvasLeftInPercentage”]; var endPointTop = styleObj[“styleMapping”][“2”][“StyleMappingCollection”][“636422818932601231”][“PointPositioninData”][“endPointCanvasTopInPercentage”]; var startVariableValue = styleObj[“styleMapping”][“2”][“StyleMappingCollection”][“636422818932601231”][“PlacementPointData”][“startPoint”]; var endVariableValue = styleObj[“styleMapping”][“2”][“StyleMappingCollection”][“636422818932601231”][“PlacementPointData”][“endPoint”]; var […]

Next Page »