0
votes
1answer
18 views

Angularjs Class Confirm button

I am trying to create a "confirm" button for users of my website to see when they click on a button, and I am using an angularJS class. My code is as follows: class TodosListCtrl { constructor($...
0
votes
1answer
37 views

Why is $scope not working in Angular 1.6.1?

Background After following the AngularJS tutorial on codeSchool and reading some StackOverflow questions, I decided to start using $scope in order to avoid the hassle of having to define a var self = ...
1
vote
1answer
31 views

angular 1.6.1 '&' binding issues

Problem: When I bind '&' under ng-repeat(or without for that matter atm), I can't seem to trigger the parent scope's function. HTML <div ng-repeat="type in fC.types"> <repeater type="...
0
votes
0answers
14 views

Injecting $location service makes my url with fragment identifier weird

Here is my angular code var app = angular.module('app', []); app.controller('mainController', ['$location', '$scope', '$log', function(location, scope, log) { log.info(location.path()); }]); And ...
1
vote
3answers
45 views

AngularJs ng-repeat custom structure

I have a dataset like this $scope.dataset= [ {"Name":"Alfreds Futterkiste","City":"Berlin","Country":"Germany"}, {"Name":"Ana Trujillo","City":"México D.F.","Country":"Mexico"}, {"Name"...
1
vote
1answer
20 views

Adding Form Fields Dynamically in angularjs not working

I am developing an online course application. I am trying to add form fields dynamically in my application, so that I can add more video lecture for a course. However, when I click on "Add Another URL"...
2
votes
1answer
33 views

can't pass dynamic parameter to angular directive

I just took over the frontend work of our angularjs apps and I'm stuck. I've been creating directives to replace bloated html to make updating the frontend look easier. All was going well till I hit ...
0
votes
1answer
19 views

Passing Controller's $scope variable to nested directive's controller

I'm having trouble passing a scope object from one controller to a nested directive's controller. I have a directive (child) within another directive (parent), the parent directive and its controller ...
0
votes
2answers
20 views

Add/Remove class if checkbox is checked/unchecked (AngularJS)

I need to toggle a class if a checkbox is checked/unchecked with AngularJS. My Code is working on Plunker but in my controller there is no functionality. Here is the Plunker: Click! My Controller ...
0
votes
1answer
25 views

Angularjs - How to set value of Global variable according to one of the response data element

I want to set the value of glovalvar according to defined in function hello I am getting response data & according to that I want to set globalvar Value. Here is snippet: var app = angular....
0
votes
2answers
26 views

How to preserve scope in componentized Angular app containing a dialog that serves a custom directive

I have a question about how to pass scope to a template rendered from a directive. This seems like it should be so straight forward but somehow I am having a lot of trouble getting it to work. My ...
0
votes
3answers
47 views

How to iterate through angular $scope variables with a for loop

I want to iterate through an array using for loop instead of using foreach in which i m not able to break the loop. But here in for loop i getting $scope.items[i] as undefined! here i m dynamically ...
0
votes
1answer
24 views

AnularJS anonymous component replace inner scope

Hi I am using Angular with ES6, now I want to get rid of the $scope since Angular2 will not use it anymore and I want to create futureprove code,... this works: let tab = this.tabManager.getArea.open(...
0
votes
0answers
68 views

$compile directive not hiding elements in ng-repeat

After upgrading from Angular 1.3.2 to 1.5.11 it appears my custom restrict directive is no longer working as expected. The directive is responsible for hiding elements through comparing a user's roles ...
1
vote
1answer
21 views

Directives scopes and inheritance

Could someone explain to me, why with the following code: <html ng-app="myApp"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script> <...
0
votes
3answers
28 views

Angular directive not picking up the values set by parent

I have a directive that has a div, whose visibility is set by its parent. Expecting "show" to be true, but the div is still not visible initially on page load. Directive: <div ng-show="{{ show }}"...
1
vote
0answers
41 views

Using Resolve In AngularJS Routes to get Json data

I'm trying to get Json data in AngularJS Routes and then inject it to the controller. A resolve contains one or more promises that must resolve successfully before the route will change. This means ...
0
votes
1answer
14 views

Error: [$compile:multidir] when using multiple directives on same element

I made a form for credit cards payment which contain many validations, on the input below I try to validate 2 settings, one is the card type (visa,diners,amex, etc...) and the second validate is for ...
-1
votes
1answer
34 views

How to trigger the function after DOM markup is loaded in angular style application except onload

I need to show a Simple current time with an angular based-application.So have tried a demo. In the body onload function execute the piece of function. <body onload="startTime()"> function ...
-1
votes
0answers
43 views

Angular constructor function possible memory leak

In our app we use constructor functions intensively, but whenever we are initializing a scope object with new and constructor function it is placed on the Heap (Open Profiles in chrome dev tools and ...
3
votes
1answer
65 views
+50

Angular JS : Uncaught DOMException: Failed to execute 'removeChild' on 'Node' on HTMLScriptElement.callback

I am using Angular JSON Http call. in the same When I make the post request like this : app.service('AjaxService', [ '$http','$q','$sce', function($http,$q,$sce) { return { ...
0
votes
2answers
45 views

Using $location.url() inside a directive not working in angularjs

I have a directive and inside it, I used the $location.url() but it seems not working, and I think I need to inject something on my app but I don't know where to inject it. By the way I'm new to ...
1
vote
1answer
45 views

angularjs country code look up from jsonfile via $http request

I am trying to look up country codes from a json file to get the full country names: $scope.fullname = function (option) { $http.get('files/names.json').success(function (data) { for ...
0
votes
1answer
38 views

How to create a modal using angular components?

I'm pretty new to angular, and I'm trying to create a modal as a component (trying not to use ui-bootstrap or libraries) and I'm having trouble wrapping my head around it. My code: App.component('...
1
vote
1answer
30 views

google map does not show properly

how to call initmap method in angularjs because. map does not show... properly when i use $scope.mymap = function(){} when i clicked refresh button its working fine, but when i change the tap, and ...
-1
votes
1answer
37 views

Angular JS live select dropdown search filter

I am grabbing some news items from a newsfeed REST API and have implemented a free text instant search. I am now trying to implement a search from a dropdown list that works with the same data but I ...
2
votes
2answers
46 views

“$parent” in multi-level directives

I am trying to understand a working code. It can build a very simple json data by adding name:value pairs one by one with GUI; by a custom directive and its link function, it builds a html template as ...
1
vote
0answers
31 views

Can a directive inherit a ng-click from his parent scope?

I am trying to work with ng-view directive and I want to batter understand the parameters of my scope and controller. my web page has a static part and inside of it the ng-view directive like so: &...
0
votes
2answers
33 views

When does ng-class ends expression evaluation and applies the class?

I'm trying to reach something similar to a FullScreen-mode feature: using a button to trigger the fullscreen mode, then another button to return. The subject: <div ng-class="{full: !...
1
vote
0answers
36 views

Angular service to share data - Is this the correct approach?

Hello Angular Gurus, I'm using a service to share data between two controllers. I'm sharing data between BankController and CreateBankController. What I observe is that the CreateBankController ...
0
votes
3answers
38 views

rootScope variables are null after time

i'm developing an app with ionic that should save some variables like rootScope variables at the login and reuse these variables in http requests during the run of the application. My problem is that ...
0
votes
4answers
56 views

AngularJs Custom Directive scope data overwritten

I have displayed the products based on branch and billing account. In the product template, i have a "+" button, if we click on the button, then i'm displaying the particular product id below that ...
0
votes
1answer
24 views

Angular 1.5 directive with one-way binding updates parent scope

I have a directive with an isolated-scope and one-way binding variable. yet when i change that variable in the directive controller it updates the parent scope as well. Example code: function ...
0
votes
0answers
40 views

Angular two forms, two ng-click, same function, only the first one runs

I have two forms on a page. The first adds an item to the database, and the second is prepopulated with the data and allows the user to modify the item. The first form allows the user to create and ...
1
vote
2answers
51 views

$scope variable do not respond to the onClick function of angular chart

I have a chart in the page. When one click in the chart, the onClick function will be called and it will know which category of the chart has been clicked by user. I created a div to show $scope....
0
votes
3answers
27 views

Angular JS : Error while getting data from typeahead

I am getting error while loading the module for angular JS in my Module, UI bootstrap here is not getting loaded despite of all the dependencies resolved. can any one help me ? Fiddle Link https:/...
0
votes
1answer
15 views

Angular $destroy method not called on page navigation in Rails app

I have an application that uses both Angular and Ruby on Rails. Some of my Angular controllers create $interval timers that need to be cancelled when the user navigates to a new page. This Stack ...
0
votes
2answers
41 views

AngularJS - Factory variable doesn't update in controller

I'm facing a new issue with AngularJS. Infact, since I need to have a "shared" variable, readable and updatable in 2 controllers, I thought about doing that with a factory injected in both the ...
0
votes
3answers
36 views

Access the main controller's scope from inside a directive

Suppose the following blueprint code: <div ng-controller="myCtrl"> <div ng-repeat="..."> <div ng-repeat="..."> <div ng-repeat="..."> &...
0
votes
1answer
27 views

how to use google map in angularjs with script of key Without Google SDK

i don't want Google SDK, i have following code..i but its show error when i use tag its working fine but i am using angularjs its show error , normal page with script in page its working fine..how ...
0
votes
0answers
25 views

Calling link function as to reset message

Here is a part of my code: <div class="col-xs-5 col-lg-5"> <select ng-model="criterion_id" ng-options="..." > </select> </div> <div ng-if="criterion_id===1"&...
0
votes
1answer
21 views

How to toggle data in one directive using an ngClick function in another?

I'm building a weather app using Angular 1.5.8 and need to give users the ability to toggle back and forth between imperial and metric measurements for the temperature and wind speed. The toggle ...
0
votes
1answer
17 views

Angular: Passed params in nested directive is of state “undefined”

We are following an example from http://mfauveau.github.io/angular-query-builder/ and modifying it to fit into our requirement. We have a modal view(.jsp) that has integrated directive (named as '...
1
vote
1answer
24 views

AngularJS model update reverting back to original

http://plnkr.co/edit/3UMwSK6H5VL0pZujL7Qh?p=preview Click edit and then cancel. The text boxes do not go away. Click cancel again, they go away. Please tell me why this is happening. I am losing my ...
0
votes
0answers
11 views

how to add google api script angularjs page

How to add this script in angularjs please help me.. when i click from page ng-click="ListCtrl.Location(engineer)" below method call and show other page Location(engineer) i have below HTML page ...
0
votes
1answer
29 views

AngularJS: Passing into a directive link function an attribute AND the entire scope

I have a directive that has an attirbute, it looks like this: <directive config="myConfig"></directive> This is my directives code: app.directive("directive", ["$compile", ($compile)...
0
votes
2answers
21 views

Isolated scope's property does not affect its parent

Here is my code: <html ng-app="myApp"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script> <body> <div ng-controller="...
0
votes
0answers
35 views

AngularJS: How to add setter on $scope object property of directive?

This is my current implmentation to fire callback on customVar get change using $watch... module.directive('mudirective', function() { return { scope: { callback: '&' ...
0
votes
1answer
25 views

Accessing controller from compile function in directives

I have searched all over and the only thing I can come up with is that I don't understand something fundamental about how the compile function works. Here is what I have angular.module("app", []) ....
0
votes
1answer
33 views

Access controllers of multiple identical directives sharing the same parent scope

I am having trouble with an angular directive used an an attribute on a component. Basically, I want buttons to be draggable. I do it this way: <body> <xx-button xx-draggable> <xx-...