Tagged Questions
0
votes
0answers
6 views
How To Pass Template-Defined Variable to Angular Controller
This question is a long overdue extension of Angularjs How to pass parameter back to controller from directive with ng-click in which strings are able to be passed to an Angular controller, but ...
1
vote
2answers
19 views
Does the scope change when we change to other page?
I have created a variable with $scope in my controller. Apparently, that $scope will be applied (available) to that controller only. Can we use that $scope in other controllers of the other pages?
1
vote
1answer
21 views
Can I use ng-repeat and have isolated scope with angular component?
So I have a ng repeat block that passes an object to a angular component. That looks like this
<div ng-repeat="assessor in $ctrl.dedupeDetail.matches">
<assessordedupequickcard assessor="...
0
votes
1answer
19 views
how to change date add hours in date angularjs
i have below code i want to show date according to hours how to add 48 hours in my current date please help me in this i am new in angularjs.
"startjob_datetime" : ISODate("2017-03-13T14:21:12.231Z"),...
-1
votes
2answers
30 views
what is main purpose of broadcast in angularJS?
I saw some examples for broadcast there I observed it is for send data from parent controller to child controller only, but by default child control hava access to the parent controller so what is ...
0
votes
1answer
38 views
Angularjs watching for ng-class apply
I'm using Angular ui-router. I have something like this:
<li ng-class="{ active: state.includes('panel') }">
I want to do something (ex. toggling the menu) after class was added. How can I ...
-2
votes
1answer
24 views
Implement functions in link or pass $scope to function outside link
My questions is what is best practice + more efficient?
Implementing functions that use $scope inside the Link function, or implemet it outside and pass $scope to it?
angular.module('exampleModule', ...
0
votes
2answers
17 views
i am calling ajax when button click event ng-click but ng-repeat does not load
i was call ajax button click and ng-repeat does not load data one click but when i clicked two times its load, i don't know why please check code
$scope.myData.doClick = function (item,event) { ...
0
votes
1answer
28 views
angular 1.5 component to call the parent scope method
I have a html template + controller.
I added there a component:
<ir irtrend="addIrTrend"></ir>
addIrTrend is a function in my controller scope.
I want my component to call the addIrTrend ...
1
vote
1answer
42 views
how to set $compile code in html
I compile a string but it's not reflect on dom like.
I have some string like :
result = '<tr ng-click="someFun()" rowid="hh_'+gameId+'" id="hh_'+gameId+'" ng-class="game.currVideoReplay[' + ...
1
vote
0answers
25 views
AngularJS transcluded scope form element
I am having an issue in Angular being able to get a reference to a form element from sibling transclude elements.
HTML
<div modal-panel>
<modal-content>
<form name="myForm"...
-1
votes
1answer
19 views
Angular.js remove item from collections using filter
I need some help with this code, i'm storing "activities" and removing it.
For now it's storing but not removing. (I just need a simple solution to this code).
Angular.js
angular
.module("TodoList",[...
2
votes
2answers
44 views
ng repeat on a array to filter a key on another object to get the associated value and use watch on that value
Let say i have a object called,
scope.rec = {a: 2, b: 3, name: a,b};
And i split the "name" key like scope.x = scope.rec.name.split(","); then scope.x will become an array.
Now i need to iterate ...
0
votes
0answers
17 views
AngularJS Three Order of rowspan dynamically
I am a beginner in AngularJS. I need to do Three order of rowspan dynamically. I have referred the below URL:
AngularJS Third Order Nested Table Structure
But still it is very difficult to make it ...
0
votes
2answers
37 views
AngularJS 1 - How to pass app.js list of values to controller.js
This is regarding Angular JS One, so I created a simple app in my plunkr.
What I did? , I created a factory called app.js and a myController.js.
The problem is the Get Method from controller.js, i ...
0
votes
1answer
12 views
$rootScope is not updated in SPA
My first controller:
angular.module('application')
.controller('FirstController',['$rootScope',function($rootScope) {
var data=[0,1,2];
$rootScope.items=data;
}...
0
votes
0answers
6 views
Integrate ccavenue with angular js and how to render javascript in interpolitian expression
I am integrating CCAVENUE with AngualrJS/Web API.
1) From payment screen - making call to web api and it returns below code:
<input type="hidden" name="Amount" value="1" />
<input type="...
1
vote
2answers
46 views
how to reload ng-repeat when i clicked button asp.net (angularjs)
How would you pass data code to angularjs variable. its working fine when the page loads. But when I click the button, for filter data. The server side does not load data.
$scope.studentinformation ...
0
votes
3answers
18 views
bootstrap modal pop not working with angular js $scope
I am working on app and I've used angular.js and bootstrap.I've a page in which i used modal popup. in this popup I've item list, each item have a button.My problem is when i click on button my scope ...
3
votes
4answers
55 views
AngularJS: Directive isolate scope - scope variable undefined
Please, can someone explain me, why attrDir's scope variable is visible, and oneWay's not?
I thought that scope: {} is isolated as well.
angular.module('test', []);
angular.module('test').directive('...
0
votes
2answers
26 views
ReferenceError: lecturerFac is not defined
When I load the html page, my controller retrieves data from an API end point regarding a course. The page gets populate with the data about the course. But at the same time I want to populate part of ...
2
votes
4answers
57 views
How to pass vm to a setTimeout in AngularJs? Changes to scope don't update DOM view
I'm trying the following code. Everything seems to be working as I see the component appear/disappear depending on the value I set for the variable. However, when I do that in the setTimeout(...) ...
2
votes
0answers
27 views
Angular.js: HTML/CSS is not updating when controller changes selected item on list
I have setup my application based on a seed project and I am using Controller Alias (App.routes.js has controllerAS for each controller I am using so ::NE is a controller alias). I have a factory ...
0
votes
1answer
28 views
Data Array Always Process to String not Array With Angular.fromJson
I have a problem, I did set field form to array. Example : Field dfp_interest in response is []. So, i must set my data to array right ? I did and success in console.log. Result like --> ["5","6"] but ...
0
votes
1answer
30 views
angular factory store promise result
I have a factory object that contain private object, which is used to cache result retrieved from the api using the factory available functions.
global.mainApp.factory('SessionFactory', function (...
1
vote
2answers
39 views
Angular $scope is not available in the HTML Template but I can see it in console log?
I have been following some online tutorials and using the angularjs-template to get started with Angular. I can't get the page (html template) to update with the controller. I think there is a problem ...
0
votes
2answers
33 views
Sharing Data between Child Directives
I have three directives defined:
Parent
This should share variables between the other two directives - Child One and Child Two.
Child One
This contains an input field representing a search term. ...
0
votes
0answers
33 views
Tricky Nested ng-repeat
https://jsfiddle.net/n4qq4vxh/97/
I am building tables to describe packages selected when making a car. The dark grey is the whole package(ie luxury package), the lighter grey is the items that are ...
0
votes
0answers
28 views
AngularJS - why my scope variable is not refreshed when $on is called?
In my main app controller, I'm calling this async method which is broadcasting an event when done (loadData). In the event handler i'm loading some data to my $scope.layers array. But nothing is shown ...
-2
votes
1answer
35 views
How would I render a list of custom object type in Angular?
I have a List in java. The custom object has three fields, The title, Instructions, Data. I want to be able to render the list in a meaningful way using angularjs. I'd like to have the title at the ...
0
votes
0answers
50 views
Angular JS - Set focus to div element on keypress event
In a form canvas with multiple tabs, each tab has number of fields. When the last field in a tab is deleted(by clicking on Remove button or by clicking Delete key), the focus shifts to previous field(...
0
votes
3answers
74 views
How to access the items with square braces using ng-repeat in angularjs
I can't access some items in nested collection.
The array:
$scope.myArray = {
"pm_id": 2,
"type": "Scrum",
"estimated_end_date": "Wednesday, March 15, 2017",
"no_of_sprints": 2,
"...
0
votes
3answers
19 views
Angular 1.5 Binding ng-repeat created controls?
Angular 1.5
In an ng-repeat I create a button that will display a Bootstrap popup with anchor links.
How do I bind the onAction call so that it calls my $scope.onAction() function ? (onAction() is ...
0
votes
1answer
37 views
AngularJS back button not working after $window.location change
I am using the md-grid-tiles as links to new pages on a site. To give some context I have an AngularJS 1 app that is a single-page app using ng-view. So my links are all formatted with #page. Every ...
1
vote
2answers
34 views
How do i convert data from json to list of objects using angular js
I am new to angular js . I have a json response which i want to convert to list of objects and use ng-repeat to display these object. I am getting a list of these objects which are as follow
1 : ...
0
votes
0answers
12 views
Push Data With Attach Tag ngTagsInput Angular JS
I have a input for tagging. So, I used ngTagsInput Angular js. And the implementation like this :
<tags-input ng-model="tag"
replace-spaces-with-dashes="false"
on-tag-...
-1
votes
3answers
22 views
$scope.value change in the same function
Hello I'm new to Angular and JS so may be this is a known issue or a dumb bug that i made, so i have this controller in which i have this function :
$scope.companies = []; ...
1
vote
3answers
63 views
Push object with angular foreach
I have a data type object like this :
["Tag Name13", "Tag Name12"]
But if i push with this script :
var list_tag = [];
angular.forEach(retrive_data.tags, function(item){
list_tag.push(item....
0
votes
4answers
83 views
Possible to call 'alert()' or 'console.log()' from Angular ng-click Expression?
I was trying to test if my ng-click binding was working -- but I seem to be running into a more-fundamental problem -- how to see what is happening (or not).
My usual 'crude' debugging methods, alert(...
0
votes
1answer
39 views
Angular JS freezing DOM when using ng-repeat to iterate through massive dataset
I currently have an app that when a button is clicked, it will send an $http request and return some information. I then update $scope variables rows and columns with said data. ng-repeat proceeds to ...
0
votes
1answer
34 views
AngularJS directive scope property doesn't render in directive view
I have a problem with scope property of directive that doesn't render want to render in directive view.
app.js
.config(function ($routeProvider) {
$routeProvider
.when('/', {
...
0
votes
3answers
25 views
AngularJS scope of variable [duplicate]
I'm trying to get a json file within a a controller with $http.get. All well until I try to access the property which holds the response. If I try console.log(property) inside the $http.get() it ...
1
vote
1answer
46 views
AngularJS ui.router won't load template
I'm still learning AngularJS and having trouble with UI Router.
It just won't load the template.
Here's my code:
<body class="top-navigation" ng-app="mixcontainer">
<div id="wrapper"&...
1
vote
1answer
108 views
Angular Digest Loop on ng-style / Dynamic Photo Grid
I have a filter that changes filtered object. But when I'm using ng-style="item.gridSize"
My Filter: (The Algorithm for size Grid was taken (changed for my needs) from Here
angular.module("custom....
0
votes
0answers
14 views
Load a view with rendered model in controller angular.js 1
I am building a website in angular js 1. In a controller, I need to load data from ajax than I have to set a specific html with values that has been got from some web service.
Here is my service ...
0
votes
1answer
50 views
How to refresh data in angularjs kendo-multi-select
I am new to angularjs. i am using kendo multiselect i am adding data by default when loading the view. and i have one save button when click that button i am calling Success method inside that method. ...
0
votes
1answer
46 views
Data getting overwritten or corrupted. What is the reason?
Here is my code for the controller and the service. I am using AngularJS v1.6
app.controller('ServicesCtrl',['$scope','$http','DataService',function($scope,$http,DataService){
$scope.returnedData =...
0
votes
0answers
24 views
Using an Array.prototype.forEach in AngularJS not updating to the view
I have a piece of code inside an angular controller that requests three services for data. Once the last service returns, I'm taking the data from all and merge it into a dataset. Out of the nested ...
0
votes
0answers
11 views
Angular get information binded to a cookie
I've got these codes.
HTML
<div id="agregarpedido_table" ng-init="zero = 0">
<div id="agregarpedido_table_item" ng-repeat="entrada in entradas">
<input type="text" ng-model="...
0
votes
1answer
44 views
Change angular $scope value when different radio button is clicked
I am doing an angular project, I have tried to change scope values and element values by changing radio button. When radio button 1 is clicked I am getting value from server and saving it in scope and ...