In AngularJS, a scope is an object that refers to the application model. It is an execution context for expressions.
5
votes
1answer
8k views
How to use SASS in Ionic framework?
I am trying to use SASS in my project. I open this link and follow all command. I create a project and setup SASS.
http://learn.ionicframework.com/formulas/working-with-sass/
I got this directory ...
0
votes
3answers
39 views
AngularJS update data in ng-repeat from http request
I searched for solution but I didn't found an answer. What is my problem, on my category view I have init function which makes http request and get all category from database. I use that records and ...
0
votes
2answers
27 views
Data share between directive and controller in AngularJS
I need to take a step back and understand the data flow between controllers to directive, directive to controller and the inline template vs template url in directives.
I have customDirective ...
0
votes
1answer
23 views
ng-class not working even when variable is toggled
So I have this broadcast receiver which receives info when data= false if should toggle a class:
$rootScope.$on('toggleRangeMode:broadcast', function (event, data) {
$scope.isRangeMode = data;
...
0
votes
0answers
8 views
How to add template to child from ts code using ElementRef in angular2
Lets say i have a component app and a component child, in App Component template i have the ability to use
<child-template></child-template> and its working just fine.
I have another js ...
0
votes
0answers
20 views
Mulitple directive asking for new isolate scope (directive inside directive)
i got this Error: [$compile:multidir] Multiple directives [otherProgressbar, otherProgressbar (module: toms-standalone)] asking for new/isolated
I am trying to wrap a directive inside a directive
...
0
votes
0answers
16 views
Chrome loading the page, password is filled automatically but element.value reuturns nothing
This is a function inside my code:
$timeout(function() {
console.log("simulated email is: " + document.getElementById("email").value + ".. password: " + document.getElementById("password").value )...
0
votes
1answer
28 views
How to store id and display name with $scope in angularjs?
I am new to angularjs and not getting this silly thing.please help me
with the small problem.
Below is my controller from where i get data to display in dropdowns
with filter.
$http.get("...
0
votes
3answers
35 views
AngularJS $scope variable changing value for no reason?
I have an angular controller that get's data using the $http.get() method. I assign the response data to $scope.foo and also $scope.bar.
I then bind $scope.foo to an input field using ng-model="foo", ...
0
votes
1answer
16 views
Using $scope value to compare dates using momentjs
I am currently using a select option to generate months and years using the angular attribute ng-repeat to gather data for credit card expiration dates. I would like to return the value of the month ...
1
vote
1answer
10 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 ...
0
votes
0answers
20 views
Calling controller function inside a directive without isolate scope
i have problem with calling controller function inside directive,i have error that reference is not a function.Also i don 't have isolate scope in directive.
My controller :
app.controller('...
20
votes
4answers
17k views
Use of symbols '@', '&', '=' and '>' in custom directive's scope binding: AngularJS
I have read a lot about the use of these symbols in the implementation of custom directive in AngularJS but the concept is still not clear. I mean,
what does it mean If I use one of scope value in ...
0
votes
2answers
25 views
angular js filter inside ng-change
my data template looks like this,
scope.items=[{"name:"John","score":1},{"name":"Rick","score":5},{"name":"Peter","score":2}]
I have a select box with values 0,1,2,3,4,5 and would like to filter ...
2
votes
3answers
60 views
Dynamically loading Views and Controllers in AngularJS
I want to know what's that proper way to handle the business logic in terms of loading the appropriate views and controllers.
I have a bunch of factories to load resources, read and write user ...
-2
votes
1answer
25 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', ...
5
votes
2answers
26 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
28 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
35 views
angularjs fullcalendar eventclick scope
i have a controller named CalendarDemoCtrl where i have the config for fullcalendar as shown below.
$scope.uiConfig = {
calendar: {
height: 600,
editable: false,
...
0
votes
1answer
22 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
31 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 ...
12
votes
3answers
65k views
Why is Angularjs ng-pattern not working with the following regexp?
For some reason the initialized value doesn't appear in the field, but the second field without the ng-pattern does work. any ideas?
angular.module('app', []).controller('MainCtrl', function($...
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 ...
1
vote
1answer
109 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....
1
vote
1answer
43 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
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
2answers
18 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) { ...
1
vote
3answers
785 views
How to store user details for further use in angularjs
I am working on web application using angularjs. I need the user's email address throughout my application, how can I store it for further use?
Currently what I am doing is:
I have created a user ...
0
votes
6answers
4k views
How to update scope variable value in view after http call?
I am making my first project using Angularjs 1.4.3.
In my controller I am making a http request, in the success method of this http request I am updating a scope variable. In http call I am getting ...
1
vote
2answers
524 views
Alert directive not showing after it has been rendered once
I have a directive to display an alert message every time a post call succeeds/fails. The alert for the first post always succeeds but if I close the alert, and trigger another post the alerts don't ...
0
votes
1answer
606 views
Adding files to $scope in AngularJS controller
I have the following input element:
<div class="form-group">
<label>Attach BOL Document</label>
<input name="file" type="file" class="form-control" onchange="...
1
vote
0answers
27 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"...
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 ...
0
votes
0answers
34 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 ...
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 ...
-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",[...
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;
}...
295
votes
7answers
339k views
AngularJS access parent scope from child controller
I've set up my controllers using data-ng-controller="xyzController as vm"
I have a scenario with parent / child nested controllers. I have no problem accessing parent properties in the nested html by ...
0
votes
0answers
8 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="...
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 ...
0
votes
3answers
409 views
anuglar js: ng-repeat doesn't displaying anything
I'm not really a js guy but i tried to show something with the ng-repeat in angular. But it doesn't display anything.
HTML:
<div class="list-block" ng-controller="ContactController as acontact"&...
3
votes
4answers
56 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('...
2
votes
4answers
58 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(...) ...
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 ...
-1
votes
0answers
33 views
Adding New Rows Dynamically in editable format in Angular-ui-Grid
I am trying to add new row on button click in angular-ui-grid. i have reffered many examples but they only add new row with data which is shown here. And also if i add blank row with empty data, empty ...
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
31 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 (...