-1
votes
1answer
43 views

AngularJS textbox value undefined

I have created a directive wherein it copies the value of textbox1 to textbox2. function myCopyText() { return { restrict: 'A', link: function(scope, element, attr) { ...
0
votes
1answer
44 views

Ng-Repeat showing irregular behavior with one time binding

I am having a ng-repeat directive that is running on the array on object. I am facing a specific scenario in which, When I Bind my object properties with one time binding they are now getting ...
0
votes
0answers
15 views

Angular js 1.5 + emit listener not working

Facing random issues with Angular Js Listener : data is being emitted by rootscope.emit event in service on a particular id Same data is not being listen by listener on root scope into controller ...
0
votes
0answers
57 views

Why do I get undefined for this Angular scope?

I use a factory to create objects for a particular module angular.module("myModule").factory('MyEntity', .... And the module accepts the generated 'MyEntity' as an injected dependency: angular....
0
votes
0answers
19 views

Angular scope not updated on rootscope event

I'm currently making a notification banner for my application but my data does not refresh in the dom when I update after listening to a rootscope event. I've tried to put that code into $timeout or ...
0
votes
2answers
48 views

How to fill variable with values by service (AngularJS)

My variable has no value after calling the service. I defined the success function as a separate function and called it in the .then() method, here's the code: // Code inside the Ctrl: var ...
0
votes
2answers
19 views

Angular JS - How to assign each item in a json object to a scope variable?

I have a set json object like var data = {item1: "Hello1",item2:"Hello2",item3:"Hello3",item4:"Hello4",item5:"Hello5"}; I want each item to be available in the scope. Like $scope.item1 $scope....
0
votes
0answers
6 views

How to generate the custom id in firebase using Post method with angularjs

I am using POST method to post some user data , for example I am making a database which have Shipping Cart, Shipping Address and User Id. So I just want to remove all random keys which will generate ...
0
votes
0answers
29 views

How to validate fields in a form based on checkbox selection?

I'm having a customer form, where users can enter their contact details. And also there is checkbox for alternate contact details. I have to validate all the required fields in both sections. I have ...
2
votes
1answer
27 views

Angular - Error: $rootScope:infdig when setting a directive attribute using a controller variable

I have a directive that prevents certain values from being entered into an input. For example this... <input type="number" name="testValue" ng-model="testValue" block="[0, 10, 17]" /> ......
0
votes
1answer
36 views

Issue in accessing $scope variable in $mdDialog Controller - AngularJs 1.X.X

I'm using $mdDialog and I specified a Controller which is present in another js file. Parent Js Controller: $scope.AddDesignationPrompt = function(ev) { $mdDialog.show({ controller: '...
1
vote
2answers
35 views

AngularJS - How to keep the scope variables live even after going to another state and coming back?

I my angular app, I have a list of items shown in one page and on clicking continue button, the app will move to another state. In that page there is a "Back" button which has the code $state.go('...
1
vote
1answer
28 views

AngularJs Inject multiple directives from separate files into one common module

there is a question regarding referencing and injecting directives into different modules. The goal is to inject multiple directives located in separate files into one module, and then inject that ...
0
votes
2answers
43 views

accessing angularjs textbox value in a controller

I am trying to learn AngularJS and require help in passing user entered text box text value after button click to append to a string url value while calling the http service. I'm trying to add in ...
0
votes
0answers
20 views

Angular js directive not updated

I'm facing a problem when I'm trying to update a value in my directive. Here's the directive template <div class="mobile-wall"> <div> <h6>{{ vm.post.date_created | ...
0
votes
2answers
18 views

Handling several instances of page in Angular + some other stuff

I am building a new application using AngularJS and hereinafter is a simplified description of it. There is a single working page into which I have pills and tabs (using Bootstrap) along with a side-...
0
votes
1answer
32 views

$scope.watch being called too many times

I thought I had this problem solved but it turns out I didn't so any offers of help would be much appreciated. Basically, I'm having trouble with my controllers and scopes which is causing my $scope.$...
0
votes
1answer
19 views

Angular Directive: Button Spinner

I have created a directive, its behave like when you click on button it will show spinner or loader, its show user there is something in progress like API call or moving to another page, I am facing ...
0
votes
1answer
17 views

Issues in md-select using nested JSON - AngularJs 1.X.X

I having a two drop downs "Department" and "Designation". Initially I loaded the Department and based on Department selection, the Designation will auto populate. Kindly have a look into the JSON ...
0
votes
1answer
20 views

AngularJS: create single controller but use it in different parts of the page with different data

I need to write piece of code with AngularJS which will build some table with logic. The information for the table should be obtained from the server. Under the table on the page there should be a ...
0
votes
0answers
28 views

why AngularJs $http.post and $http.get can only return 138 rows?

Im using AngularJs with Php, and i have 1,500 data... the problem is , $http returns nothing if i set the php query as Select * to select the entire 1,500 data, but then if i limit to Select * From ...
-1
votes
2answers
56 views

Pass angularJs variable to javascript Variable

I have Angularjs variable that I want to pass in javascript variable. I found solution here so it didn't work. My code : <script> var demo=angular.module('demo', []); demo.controller('...
0
votes
1answer
23 views

Access and Display Returned data from Directive

I've searched much but did'nt find any answer for my problem. I am new to angularJs so please explain in easy way... i am using a library for social media login ...everything is working fine.. but i ...
0
votes
1answer
15 views

Use C# EF objects in AngularJS code

I am currently working on an angularjs application with entity framework. I am facing a situation which I am sure is very common and everyone must have faced it. I have c# entity classes generated by ...
0
votes
2answers
42 views

Why do I need a $watch when using function in controller in combination with a directive

I know and can imagine why I need the commented lines of code to let this work. But I can't found the technical reason. Why is the field not update when you click on the button? (the $watch fixed the ...
1
vote
1answer
31 views

Angular dropdown add option to fetched data

I've been looking around on SO for quite some time, but none of the even remotely close questions to mine seem to contain an answer to this. The situation is the following: I'm populating a dropdown ...
1
vote
1answer
58 views

$http Post doesnt send data

Im truing to send a email but for some reason cant send the data in my http post, in my php var_dump data says array dont have any proeprties, i dont receive the data in my php script. network sent ...
0
votes
1answer
26 views

Updating a form input name value after a $scope.$watch is triggered

I am using AngularJS 1.4. I have a form input element and I'm trying to set the name attribute dynamically. <input type="email" name="{{ctrl.name}}" class="form-control" id="email" ng-minlength="5"...
1
vote
2answers
23 views

2 promisses together returning null

im making 2 requests, but when i get the values from the result if i call the variable outside the promise it get null, but since i depend the requrest result of 2 different promisses and also i need ...
-1
votes
1answer
83 views

SyntaxError: Unexpected token t in JSON

Im creting a angular app that gets some data from a api available online, first i get the api information from my php script than in my angularjs app i go get the json result, but is giving me the ...
0
votes
3answers
23 views

Using object as ng-value sets value to [object Object]

I have a set of question that come from a JSON file. In my view I loop through these questions and output the type of input: <div ng-repeat="question in questions" id="{{question.id}}"> &...
0
votes
1answer
44 views

AngularJS-Directive (issue with isolating the scope)

I have a directive which is responsible for the functionality of a confirmation process (see pictures). It works as expected, except after clicking the Submit button, the check icon is displayed for ...
0
votes
1answer
36 views

Access-Control-Allow-Origin in angularjs production

In my angularjs application im trying to get some information, in my case longtude and latitude from a rest service online, but is giving me a error of XMLHttpRequest cannot load http://iatageo.com/...
0
votes
3answers
38 views

angular : $scope is not reading values from HTML

I have this code where I am expecting some data from the View/HTML but the variable $scope.cityName is undefined. app.controller("citycontroller", function ($scope, cityfactory) { $scope....
0
votes
1answer
18 views

TypeError: Cannot read property 'go' of undefined with injected $state

i already checked on stackoverflow and i see there are duplicate posts, but none of them resolved my issue. The issue with most of the cases is the injection of the $state. But i already injected in ...
0
votes
0answers
16 views

After two-way bind model attributes in directive are updated, directive is re-rendered

I have multiple text inputs here with binded models/attributes and I have ng-model-options set to update on blur. My models update as expected but the problem is that each time an attribute in my ...
0
votes
1answer
40 views

How to filter data by button value in AngularJS button click?

I am trying to search data with fix button value like when I click on veg button I want to only veg category data. right now my code is like. actually I am new learner for Angular js code. First ...
0
votes
1answer
67 views

the server responded with a status of 500 (Internal Server Error)(asp.net mvc and angular js)

I am Getting null value in action method when i am pass data from angular js to action method. i debug and see it hit to the AddCutomer method but data is null(the server responded with a status of ...
0
votes
2answers
43 views

Angular 1.5 - Custom directive to show Money Color

I'm creating a directive in Angular 1.5.x to write the $Money amount in red or green, depending on if it's a loss or profit. <div financial-Color amount="model.Money"></div> My custom ...
0
votes
1answer
12 views

Laravel parent variable ng-click

I am having troubles with Angular in Laravel. I am trying to change a variable by clicking on a button. For this I wrote the following code: <div class="user-team-navigation col-sm-12" id="user-...
-1
votes
1answer
15 views

how to add $model for show pop html angularjs

i am using below angularjs library in my project... i want to and $model its show error why i don't know https://ajax.googleapis.com/ajax/libs/angularjs/1.6.3/angular.min.js below code does not run.....
0
votes
1answer
36 views

$scope variable constantly changing

I have the problem that my variable $scope.test is continuously changing. First I have a function on my node.js server, which returns a json object like the one below: { objectOne: "some text", ...
0
votes
1answer
23 views

AngularJS custom filter for two columns

i have a select-box with option1 and option2; i have a table with column1, column2, column3, column4. Column2 and column3 are numeric fields. 1) i want that i selected option1 in select-box, the ...
0
votes
1answer
168 views

Accessing $scope From a Directive in AngularJS

Due to our lack of expertise in developing with AngularJS, we've come to another roadblock in our development process. We are developing a Angular/Web API application where our page only consists of ...
1
vote
1answer
42 views

$scope.$on use passed value

I get this problem when I send data with broadcast, here is my code: $rootScope.$broadcast('myEvent',{ data:"value" }); and my on code: $scope.$on('myEvent', (event, args) => { $scope....
0
votes
1answer
22 views

Listen to multiple events inside a scope

I have a simple factory that broadcasts message when a POST, PUT and DELETE calls are done via it. After that inside a controller, I listen and perform a set of actions that are same for all the 3 ...
1
vote
1answer
34 views

Angular Filter: re-apply on object property

I am working with Angular version 1.6.1. I have an event object array that is loaded into the dom using ng-repeat. An event has the following properties: { city: "" hash: "" timestamp: 1234578910 ...
0
votes
0answers
119 views

Angular 1.5 component inside ng-repeat, template function run just once

I tried to use angular component replacing directive for creating component (a data table). I want to use the component inside of ng-repeat like: <div ng-repeat='item in items'> <my-...
0
votes
3answers
100 views

how to make $http.get Url dynamic in angularjs

Can we make dynamic url like whenever we select a value from first drop down the url should be http://api.fixer.io/latest?base=value. It means when we select value(USD) in first drop down the same ...
3
votes
1answer
52 views

Empty Array inside Controller's function called from Directive - AngularJS

I'm having a pretty tricky problem that seems to be trivial but I'm not finding a good way to solve it. Essentially, I'm building a todo list application using Angular and Angular-Material. I have a ...