Newest 'angularjs' Questions - Stack Overflow

Questions tagged [angularjs]

Use for questions about AngularJS (1.x), the open-source JavaScript framework. Do NOT use this tag for Angular 2 or later versions; instead, use the [angular] tag.

0
votes
1answer
10 views

Get the value of selected option and comparing the value outside select tag to get more data for that value

I am new to AngularJS and recently I made a select tag with ng-repeat. I have a JSON API propertyDetails in which I have details of some properties. I am able to get the names of all the properties ...
0
votes
2answers
20 views

ng-class content changes but it doesn't apply css changes

I have a page with two tabs and in one of them I have a clickable component that is supposed to change a scope attribute that represents a class. The class content changes is working fine but it is ...
0
votes
1answer
36 views

Display values from array base on the selected values (build a string from array)

I need to display custom string values base on the selected values from an object array. I think I'm close but there is a small issue that I cannot figure out. Right now If I selected everything from ...
0
votes
1answer
26 views

Not able to remove # from url [duplicate]

I tried removing # from the url like http://locohost:8080/app/#/home . Tried using $locationProvider.html5Mode({ enabled: true, requireBase: false, ...
0
votes
0answers
36 views

how communicate backend without typescript in angular

I'm trying change https://akveo.github.io/blur-admin/ project. Its controllers are all in js format and I can't migrate them to typescript. So now I can't import any libraries to my controllers (I ...
1
vote
1answer
14 views

How do I show angularjs material validation for another model property?

Using angularjs and material, I want to be able to have a readonly textbox that displays the name for a selected object a user looks up (via a modal popup), but the textbox validation should show as ...
0
votes
0answers
11 views

Angular 1 - Provide decorator

In app.module.js : import { DatepickerDecorator } from './datepicker.decorator' export default angular .module('appModule', []) .config(appRoutes) .config(DatepickerDecorator) In datepicker....
1
vote
0answers
21 views

Dynamically change value in uib-tabset attribute

In my project I use ui.bootstrap.tabs. On md and lg screens tabs should appear vertically stacked, but on screens sm and xs I want to see them appear horizontally. All I need is to set value in ...
0
votes
1answer
8 views

Angularjs (1.3) - UI element values are cleared (unbound) when once hidden and shown back the div element of current controller from master

In Angularjs values are cleared only for UI components like (input, textarea, button) when I use ng-model to bind them. In the Master page (asp.net), we use two <div> elements, we dynamically ...
0
votes
0answers
18 views

How to make Angular-chart timeline with custom labels and chart points positioned by percentage?

I'm trying to create a chart with problem zones, that can happen in floating amount of time. Each problem zone has its power from 1 to 5, start time and end time. I tried to make custom scale type, ...
0
votes
0answers
5 views

How can I generate a fake coverage report for a Typescript/angularjs project with an artificial 0% coverage value?

I'm dealing with some legacy code that is being ported to newer frameworks. We're not going to bother to start unit testing the legacy code, because as we port it we also revise the business ...
0
votes
0answers
31 views

ng-click in directive seems to trigger only once

I am trying to implement a directive that replace a tag by a with ng-click in it. The ng-click call a function that replace the content of a div (always the same) with the content of another ...
2
votes
1answer
16 views

DateTimePicker is clearing date by just opening the calendar

When I click on the datetimepicker button it clears the date. 'use strict'; app.directive('defaultDate', function () { return { restrict: 'E', templateUrl: 'app/directives/...
0
votes
0answers
10 views

Why am I getting a 404 error when using ngresource save?

I'm following an old Pluralsight tutorial that is no longer updated and have hit a wall: I am using Visual Studio 2013 and Angular JS v1.4, and have to use this tutorial as we are using this version ...
0
votes
1answer
15 views

Angular http to Wiremock stub does Option instead of Delete with 200 -> Page continues to onRejected

I have an AngularJS application with WireMock stubs. There is a button that calls a method to /api/deleteThis, using the following code: onDeleteButtonClick() { this._deleteThis() .then(() =...
0
votes
0answers
35 views

how to call the a rest api using JWT in angular js

i have created one web api with jwt token based authentication in webapi. i want to call the rest api in the html page with angular js $http. i tried but its showing request failed .im getting ...
0
votes
1answer
19 views

Not able to enter any text in ckeditor after showing it in modal

I'm displaying ckeditor on button click in modal for user to input data in it but some times after ckeditor is displayed user is not able to enter anything in text box. This is the HTML code : <...
0
votes
2answers
56 views

Add color to div based on dynamic data in ng-repeat

I am trying to do a table with three columns, and n number of rows. and every alternate row should have a different background color. The data I have is dynamic. I am able to get the row and columns, ...
0
votes
0answers
36 views

AngularJS directive is not triggered

I am trying to create my own directive to highlight selected menu (I know this can be done with ui-sref and ui-sref-active but I need to expand my directive a bit more later on). I can't get the ...
0
votes
0answers
19 views

I upgrade my existing application with angular-js version 1.3 to 1.5. In 1.3 select.js library working fine but 1.5 not working

I m using angularjs 1.3 with select.js library. it's working fine that but when ever i upgrade angularjs 1.3 to 1.5 then select.js library not working it's throwing error. [ui.select:transcluded] ...
0
votes
1answer
25 views

Convert angularJS directive to Angular typescript

There's this JSONEdit AngularJS directive: https://github.com/mb21/JSONedit which I want to use for my Angular (version 5) application. I haven't worked with AngularJS for ages since I've only used it ...
1
vote
1answer
35 views

AngularJS data doesn't refresh until second button click

I want to add jQuery datatable using AngularJS. $scope.SearchData = function () { var myData = new Object(); myData.EmployeeCode = $("#Person").val(); $http.post("/admin/...
0
votes
1answer
34 views

AngularJS dynamic select inside ng-repeat

I'm printing a list of products in a table. This list of products has a product type (typeId). I want to be able to change the typeId of the product directly in the table by using a select input. The ...
0
votes
1answer
15 views

How to pas active link value inside selected option function on change

I have select and list: <select ng-model="atndYearSelected" ng-options="year for year in atnd_years|orderBy:'-year'" ng-change="getAttendance(selectedYear,month.number,infoList['0']['...
0
votes
1answer
12 views

Plotly.js not working with SSR Angular application

I'm trying to build an Angular app with SSR, but I ran into problems with plotly.js. Here is the error I get: C:\Users\x\Desktop\Angularapp\ngseo\dist\server.js:351783 var style = document....
0
votes
0answers
11 views

how to fix unexpected component declaration by module while running test?

I am trying to perform unit testing on my angular application which has two components. root AppComponent and a myFormComponent. I want to perform unit testing on the form fields available in the ...
1
vote
0answers
31 views

Read the contents of a file as a stream [duplicate]

I am currently developing the frontend part of my application in angularjs. I have to process files of a huge size. I read the contents of the files and send it to a backend for processing. As the ...
0
votes
1answer
8 views

Search method to show record before data update in sql server Angularjs asp.netmvc

Angular js function updating some record. After updating record i am calling search method to show data on view. But record does not updated before that search method call that does not get data so ...
0
votes
0answers
12 views

multiselect drop down on click of outside dropdown

I'm unable to close the multiselect drop down on click of outside dropdown using below code. Tried in 2 ways as commented in the code but still unable to close it on click of outside dropdown. Code: ...
2
votes
3answers
58 views

Display two fields as mandatory based on selected radio button

I have this radio button in HTML. <div class="radio"> <label> <input id="vendor" type="radio" ng-model="c.data.cvendor" name="customerType" value="cvendor" ng-true-value="CVendor" ...
0
votes
0answers
11 views

How to download canvas present in different web pages into a combined single PDF?

I designed a piechars and bar graphs using canvas.These bar graphs and pie charts are present in different web pages.I am able to download and convert them into individual PDF using JSPDF in ...
0
votes
0answers
18 views

Unit Testing with Angular Modal Service

I have used Angular modal service to show popups in my angularjs web application. Once it comes to the Unit testing how can I test the Angular Modal Service section that contains inner promise as well....
-2
votes
0answers
10 views

How to restrict to show data in network in post api with angularjs and ajax?

i am using ajax and $http for run rest api. For more security in my code i want that in post api sending data will not visible to any user.
1
vote
1answer
34 views

How to scroll to the first invalid input in angular forms? [on hold]

I am working in an big angular Project. how can i scroll to the first invalid input in angular forms without using jquery ?
2
votes
0answers
38 views

Import angular 1 promise ($q) to node

im trying to run some sample code using node, by using node -r esm main.js In this sample code I would to use angular promise, question would be how do i use angular promise ($q) at a simple ...
0
votes
0answers
16 views

Angularjs dataTable stateSave not woking on chage routes

I'm using Angularjs datatable and enable save state with .withOption('stateSave', true). when I refresh the page, everything works fine But when I change routes, and came back, stateSave not working. ...
0
votes
1answer
28 views

Binding stylesheet along with HTML div when converting div data into a word document

I have a function which convert my HTML Div section into a word document. I have used various styles which is embedded in a css file. Although those styles are implied to HTML div at displaying those ...
0
votes
0answers
30 views

FB JS SDK: FB.Login callback fired twice on IE 11

I'm having a strange problem implementing the JS FB-SDK. Everything is working flawless except in IE 11. The method FB.login of the official JS API, which receives a callback, is firing it twice after ...
0
votes
0answers
18 views

GET http://localhost:4000/rugs 500 (Internal Server Error)

I am trying to make a MEAN CRUD app. I am not exactly sure which of my routes are off, but i cannot seem to communicate with the mongodb to display data. The debugger seems to break when "rug-list....
2
votes
1answer
30 views

Use value of $scope variable to specify a property [duplicate]

Let's say I have a $scope variable that stores a vegetable like so: $scope.selectedVegetable = 'carrot'; And I also have an object that contains properties of vegetables like so: $scope....
0
votes
0answers
21 views

Attempting to use UpgradeComponent results in TypeError during initializeBindings

I've got a problem, when I'm trying to use an angularJS component inside of angular 2, during the UpgradeComponent.initializeBindings method it encounters this error: at Function.keys (<anonymous&...
2
votes
1answer
46 views

Trying to convert $interval with global vars to function

I have a code that I want it to repeat for several times with different attributes. I'm using $interval from AngularJS and I'm not able to convert the piece of code into a function. Below I'll post ...
0
votes
1answer
56 views

removeEventListener in controller

I have a Angular app use angularJS v1.7 and angular-ui-router. In every controller, I have onkey event, and I have a modal menu in index.html. My problem is when modal show I need remove onkey event ...
-1
votes
0answers
11 views

PHP - Wait for a flag to be set in database and then send response to JS [on hold]

So, JS will send an API call and then I need a way for PHP to wait till a flag is set in database and after that flag is set send the response to JS. And all this while the JS should wait for the ...
0
votes
0answers
12 views

How to convert p7b to pem in browser

I am in an angular SPA project and I need to convert a p7b file into many pem encoded strings, each containing one certificate Since I am in browser I can't use openssl commands and I prefer to not ...
0
votes
1answer
22 views

How to disable page jump to top on $location params change?

I want to set URL preview param by $location.search without page jump I have tried to remove anchor from url: $locationProvider.html5Mode({ enabled: true, requireBase: false }); ...
0
votes
1answer
21 views

How to generate sequence of steps like Flowchart using AngularJS

I have a requirement where I need to generate a sequence of steps for one of the features in my application. Steps will be like, Flow starts with step1 & next step is step2 & any step can be ...
1
vote
1answer
20 views

How to generate a tsconfig.json that matches package.json + tsc command?

I'm using TodoMvc Typescript-Angular as blueprint for my AngularJS application. It is all good and works fine. Basically I can: Install or update all dependencies with that package.json doing npm ...
2
votes
3answers
50 views

How to bind a custom directive to all input elements?

I have a custom directive called HandleScroll and I need to add this directive to all input elements. When I initially built it , it was only needed on one input elements so I added it manually as: &...
1
vote
1answer
21 views

@scope value attached to button control not updating? MVC AngularJs

I have a default value for $scope.buttonId = 0 which I am using in button ng-click function like, <button type="button" class="btn green" ng-click="vm.Update({{buttonId}})"> {{ 'Save' | ...