Search Posts

Category: dynamic

multiple instance of input type file loads same image

I have a table and for each row, need to upload image/photo for it. Photo column can have multiple images for single row. Here is the issue, whenever I tap on browse button for 1st or any row, the images are upload for all other rows also even. I have attached the screenshot of it. Code for html part is below : <table style=”width:50%” border=”1″> <tr> <th align=”center”>First</th> <th align=”center”>Last</th> <th align=”center”>Age</th> <th align=”center”>photo</th> </tr> […]

mwlresizable doesn’t work

I am trying to resize a picture, but on mouse up, the picture just moves to the new position without resizing. <img id=image1 ngDraggable mwlResizable [enableGhostResize]=”true” [resizeEdges]=”{bottom: true, right: true, top: true, left: true}” (resizeEnd)=”onResizeEnd($event)” src=”{{user.picture}}”> component.ts: import { ResizeEvent } from “angular-resizable-element”; export class Component{ onResizeEnd(event: ResizeEvent): void { console.log(‘Element was resized’, event); } } app.module: … import {ResizableModule} from “angular-resizable-element”; @NgModule({ declarations: [ AppComponent, MainComponent ], imports: [ BrowserModule, HttpClientModule, AngularDraggableModule, ResizableModule ], […]

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 integrate md-autoselect in JQuery appendGrid, AngularJS 1.6?

cordial greeting to all, I have a problem with md-autoselect and JQuery appendGrid, I try to generate N Autoselect inside a column of the appenGrid in each row that I add. Issue:: The first time the page loads the Autoselect it renders normal, but when I add it dynamically when adding a new row of appendGrid, the directive is not rendered. Image $(‘#agActos’).appendGrid({ caption: ‘ACTIVIDADES’, initRows: 1, columns: [ { name: ‘actividad’, display: ‘Actividad’, type: […]

ng-repeat with dynamic list name

In my controller, I create a dynamic name of a list of years depending on the index/uuid/id of the selected row of an ng-table that generated this list. vm[“years”+id]= getYears(); I want to call this list in a ui-select So, I want to have sth like this: <ui-select ng-model=”params.filter()[name]” theme=”bootstrap”> <ui-select-match placeholder=”{{‘all’ | translate}}”>{{$select.selected}} </ui-select-match> <ui-select-choices class=”duplicate-dropdown-small” scrolly=”ctrl.addToLimit()” repeat=”option in ctrl.years{{ ctrl.id }} | filter: $select.search”> <div ng-bind-html=”option”></div> </ui-select-choices> </ui-select> That works for ng-table but […]

when use ng-include add javascript controller not work

how to when use ng-include add javascript controller not work I know I could do load all controller in mainPage but when there are many innerController and they have nothing to do with each other. Perhaps it’s not a good idea to move them all to mainController or mainPage I can’t load controller although I managed to load controller’s js file successfully. see this sample of main page: <html lang=”en” ng-app=”FirstPage”> <head> <title>test</title>> </head> <body> […]

How to handle advanced search with dynamic filtering addition using angularjs?

Below is the form for advanced search: I am able to create url and params for document sections but i am unable to think for a process to handle the “Add Property Restrictions” section as the property can be added till 5 times and it is dynamic in terms of end user. Like Below: So i want to handle it in AngularJS with addition/deletion and dynamic changes on the go and also to form the […]

Angular JS dynamic model in directive [duplicate]

This question already has an answer here: How to add ng-model functionality to a component 2 answers It can be hard to explain, but will try: I have a directive which consists of textbox + button, and updating scope variable (dynamically or by button click). Directive has two parameters: scope: { bindModel: ‘=ngModel’, /*object | model to update*/ autoBind: ‘=’ /*bool | auto bind input to bindModel or by btn click*/ } Autobind parameter decide […]

How to display sum of particular column from Array of Object which is having dynamic columns using Angularjs dynamically

How to display sum of particular column from Array of Object which is having dynamic columns using Angularjs dynamicallyDynamic Table Data Earning Columns and deductions heads will be dynamic .. <table> <thead> <tr> <th rowspan=”2″>Sl.No</th> <th rowspan=”2″>Employee Code</th> <th rowspan=”2″>Employee Name</th> <th rowspan=”2″>Worked Days</th> <th rowspan=”2″>Days (LOP)</th> <th colspan=”{{earnlen}}”>Earnings</th> <th rowspan=”2″>Gross Earning</th> <th colspan=”{{dedlen}}”>Deductions</th> <th rowspan=”2″>Gross Deduction</th> <th rowspan=”2″>Net Salary</th> </tr> <tr> <th ng-repeat=”earncolumn in earningheadlist”>{{earncolumn.hrmeD_Name}}</th> <th ng-repeat=”dedcolumn in deductionheadlist”>{{dedcolumn.hrmeD_Name}}</th> </tr> </thead> <tbody> <tr ng-repeat=”employee […]