Tagged Questions
0
votes
1answer
18 views
angularjs data binding disappearing- Failing silently
I can not create complex data models in my controllers.
every time I create them the code seems to fail silently
simple data models like
$scope.conversationList = [123456];
work just fine both ...
0
votes
0answers
33 views
Sharing scope variable between sibling directives
I'm working on a table that can be expanded/collapsed by clicking on the header bar. To accomplish this, I have two directives that appear in the markup as siblings: slideToggle and slideable. I ...
0
votes
1answer
31 views
How to optimize AngularJS config function
I have following config functions and run functions in my app.js file. What is the best way to optimize these function method ? can we move these into one single config function ?
Or Can we move these ...
-2
votes
0answers
23 views
Need help converting $stateProvider functionality into $routeProvider
In my codebase I use $routeProvider, but I want to include functionality similar to this $stateProvider example.
What would be the $routeProvider equivalent to the following code?
angular
.module(...
0
votes
1answer
30 views
handle APlayer through angular js - play music dynamically
I am new to angular js - trying to build an audio play using Aplayer
Task:-
1. Play music dynamically
2. On click of album get json data and add to aplayer
(function() {
'use strict';
...
-1
votes
1answer
40 views
AngularJS On selecting radio button set select field value
How do I set the select fields value by clicking radio button
1
vote
1answer
37 views
AngularJS not putting an array in scope?
So I'm attempting to use Angular JS and the angularSoundManager module to create a music player. I can get songs and the player to work fine, but when I tried changing the main array to be albums with ...
1
vote
1answer
52 views
How to feed data to a schema inside an AngularJS directive
I am trying to write a custom directive that will "create" a dashboard widget including:
Title (the name of the widget)
Schema (the way the data should be modelled or shown, i.e. it could be the ...
0
votes
0answers
20 views
AngularJS two way binding between controller, directive, and service
I have a table that can be sorted by column. I've made a directive for each header item that allows a user to click on the header to sort by that column. Additionally, the an arrow is displayed on ...
0
votes
0answers
34 views
ng-if scope inside of custom directive using parent scope clarification
I've found many examples (even on Stackoverflow), and also similar to this. However, still cannot figure out why my code is functioning not well, and need clarifications on that.
I have a custom ...
0
votes
1answer
16 views
Value undefined in angular custom directive
I tried to make a directive for destroying DOM elements if user doesn't have the permission to see it. I do this as follows:
angular
.module('digital_equation.auth')
.controller('...
0
votes
0answers
46 views
How to invoke a modal from a controller in angularjs / ui-bootstrap?
I am trying to display a modal (Note view) from a controller (Details controller). I have separate controllers tied to each view.
The Details view has a list of radio buttons and upon selecting a ...
-1
votes
2answers
45 views
ng-model-binding not updating when changed
[ng-repeat is used to form this table]
Want to do following tasks :
Step1- input in PromoPriceTxt3 text box should reflect in other text
boxes below it too. i.e PromoPriceTxt4
Step2- The change in ...
0
votes
1answer
38 views
Execute an Angular function only if the current tab is active in the browser
I have an angular js function which should be called for every 2 seconds only when the current tab is open in the browser. Is there any way to check whether the current page is active in the browser.
...
0
votes
1answer
93 views
how to get length in angularjs because of length my second loop not run
i have below code in angularjs but when i want length of my array 0 position its show undefined please check below code that's why my second loop does not run. in angular how to solve this type of ...
8
votes
3answers
133 views
How To Update Page After Calling $http.put service in Directive Using AngularJS/Web API/Angular-ui-router
We are new to AngularJS but are working on an AngularJS/Web API application that updates a data model from an AngularJS Bootstrap popover/directive.
We've successfully updated the database from the ...
0
votes
1answer
44 views
View is not rendering
Below is my angular code
MDIApp.controller("loginCtrl", function ($scope, $http,$location,$sce) {
$scope.toTrustedHTML = function (html) {
return $sce.trustAsHtml(html);
}...
0
votes
1answer
24 views
Angularjs addmore directive and scope management
I am trying to create a directive which has addmore button.
In the controller I have a tickets obj which is empty. I am trying to add new tickets (multiple) to this obj while clicking "Add Tickets".
...
0
votes
1answer
48 views
Javascript objects as function arguments in Angular directive properties
That title is a mouth-full! I've got some code written by another developer that's on leave and is unavailable to explain himself. None of us left in the office can figure out why it works. Any help ...
1
vote
1answer
55 views
Angular directive 1 way binding is working but 2 way binding is not
I am not using scope in my controller as i use controller as etc..
I have proof of concept that plunker without scope is working
1 way binding is working
2 way binding is NOT working - shows ...
2
votes
4answers
63 views
If my Angular Controller is not using any $scope, then how do i do 2 way data binding in my directive
I have been using Angular without $scope
Controller:
angular
.module('app')
.controller('requestController', requestController);
requestController.$inject = ['$location','requestService'];
...
0
votes
0answers
41 views
Pass parameters to dynamic controllers using ng-init
I'm trying to get ng-init working with a custom dynamic controller directive.
The problem, I guess, is that ng-init can't recognize the controller which is concerned.
MainController
var vm = this;
...
0
votes
0answers
19 views
NgMessage not working in Angular Directive
HTML that worked because placing in directive
<div class="col-md-12" style="margin-top: 5px;">
<div class="form-group-sm" ng-class="{'has-error': (orderDetailsForm.CustomerNameKey.$...
0
votes
3answers
33 views
Angular return a directive with different html based on what is passed in
I have a directive in html code that looks like this
<lcd-code lcdcode="{{data.code}}"></lcd-code>
Then my directive call a service and then it will return data in content
// the ...
1
vote
1answer
36 views
Why model is not updating the view?
I am new to Angular JS, and I am learning it through the tutorials,
my question is why my model is not updating the view?
Following is the code.
<!DOCTYPE html>
<div ng-...
0
votes
1answer
21 views
Setting watcher on multiple attributes of directive in angular
I am trying to set common watcher on more than one attributes in a directive. My code is as follows
.directive('myDirective', function () {
return {
restrict: 'A',
...
0
votes
0answers
67 views
Angular.js + ui-router wrong controller
I'm using angular 1.6.1 and angular-ui-router 0.3.2.
I have basic routes set-up as follow:
{
state: 'home',
config: {
url: '/home',
templateUrl: '...',
title: 'home'
}
},
{
state:...
1
vote
1answer
38 views
Interpolation binding with double curly brackets {{ }} causing errors in attributes
I have template:
<svg style="width:{{bWidth}}px; height:5vh;">
<path d="M0,0 L 0, {{pathOne}} {{pathTwo}},{{pathThree}} {{pathFour}},0 Z" fill="#666666" vector-effect="non-scaling-stroke"/&...
-1
votes
1answer
64 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
0answers
20 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
10 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
32 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
29 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]" />
......
1
vote
1answer
59 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
1answer
27 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
0answers
9 views
Directive Scope when calls multiple time on page
I have created a directive for button spinner, when user click it will show spinner as soon as API gives response it will hide and show the label, The issue I am facing this directive has been used ...
0
votes
0answers
29 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 ...
0
votes
1answer
30 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
2answers
43 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 ...
0
votes
1answer
50 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
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
2answers
45 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 ...
-1
votes
1answer
17 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
31 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
202 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 ...
0
votes
3answers
114 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
57 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 ...
0
votes
3answers
72 views
how to select few json values in drop down in angularjs
i am getting a data from json file and the values using in dropdown but i dont want to use all values,I want to select only three values in my dropdown.
0
votes
2answers
33 views
AngularJS: function from service don't work in ng-infinite-scoll directive
I want to use ng-infinite-scroll (https://sroze.github.io/ngInfiniteScroll/). But when I want to call function from my service (injected to controller) nothing happened (this function doesn't trigger)....
0
votes
0answers
69 views
Two way binding in custom directive with ng-repeat
I basically have a list of items that are stored as an array of objects. Some of these items are "children" of others. This is denoted by a "parentid" setting in each object. This only means that I ...