In AngularJS, a scope is an object that refers to the application model. It is an execution context for expressions.
0
votes
2answers
9 views
how to sort datetime ng-repeat in angularjs
i want to 27 December top 26 , 25 ...sort created_datetime how do this i am new in angularjs please help me
<tbody class="gradeX" ng-repeat="x in Profile | orderBy: x.created_datetime">
...
-1
votes
0answers
29 views
How to access $scope variable inside $scope.$watch function
This is in Angular 1.XX, the following question is similar but it is not answered. Instead a workaround solution was posted.
Unable to access scope variable inside $watch
-1
votes
5answers
21 views
how to show default dropdown value show top angularjs
I have a dropdown show below card information and i want to show is_default= true card show top other cards below.. please help me
<select ng-model="approvedinvoicesCtrl.currentcard.card_id">
...
0
votes
3answers
33 views
Convert Object to Array angularjs with dynamic value
{"13":"I","14":"E","15":"V","16":"G"}
to:
['I', 'E', 'V', 'G']
where the 0 property of objects have the array of 1 and 2 objects? Is there a way to do that?
<div ng-repeat="data in data" >
&...
2
votes
4answers
43 views
Read AngularJS expressions in a script outside the controller function
Because of the following quote in this thread
The best practice is never use JQuery or angular.element() for DOM manipulation inside controllers. Controllers are only used for our business logic.
...
0
votes
1answer
37 views
Angularjs Data Binding among Controller, Directive, and Service
I am trying to update content of a directive with the data coming from a service. It works like this:
Service (html5 canvas service) -> calls a method in controller on some action
Controller updates $...
2
votes
4answers
44 views
Angular - loop over nested javascript arrays
How can I use ng-repeat to loop over data that contains many nested array data?
I have data that will have many "Segments"
Example:
confirm.booking.flightData[0].Segments[0].FlightNumber
...
0
votes
0answers
15 views
download Excel with filtering in Angular JS
I would like to implement exactly excel-like filtering such as
If there are 2 columns, one of name and other would be of age.
Now when no filter is applied, filters are showing all data.
When we ...
0
votes
1answer
26 views
how to pass value from dropdown ng-change event
i want car_id how to get car_id from dropdown and pass to ng-change event please help me
<select ng-change="carsCtrl.ok(car_id)">
<option ng-repeat="item in carsCtrl.current_job....
2
votes
1answer
29 views
How can I use one service to update both the parent and child scope in AngularJS?
I am trying to implement services more in my code and would like to use only one service that updates data in both ParentCtrl and ChildCtrl at the same time.
I have read that services are singletons ...
-1
votes
1answer
30 views
access resolve in component controller in angularjs 1.5
I am trying to bind to an angularjs 1.5 component a resolve value without success, In the state definition, I have replaced the common value of template properties with a value of the name of my new ...
0
votes
1answer
38 views
How to change $scope for this because with controller doesn't work
Good morning, I'm trying to use this treeview for Angular: https://github.com/eu81273/angular.treeview
This is the .js file that I use in my HTML that I need to change the $scope for 'this':
(...
0
votes
1answer
42 views
Angular.js - ngModel value is undefined when ng-pattern is set in directive
something similar may have been answered (ng-pattern + ng-change) but all responses were unable to fix this issue.
I have two imbricated directives for creating a form input, a parent directive to ...
0
votes
1answer
23 views
Sub Scope Not Updated In Group by ng-repeat Checkboxes
I Have Ng-repeat CheckBoxes List In My AngularJs Application
"(key, value) in MyScopeModel| groupBy: 'Filed'"
Every Check Box List Has One Check Box To Select This Group All Or UnSelect
The Problem ...
0
votes
1answer
20 views
bind or print from directive
I am accessing my selected file using a directive as suggested by some SO answers,and i am able to console my file name in the directive.Now i want to bind that name to html from that directive........
0
votes
1answer
34 views
How to properly bind object in 'bindings' using $compile in angular.js 1?
I want to dynamically compile component for inserting this to specific DOM element (DOM also dynamically created by 3rd party library).
So, I use $compile, $scope.
https://jsbin.com/gutekat/edit?...
0
votes
2answers
38 views
Why does it work with $scope but not with `this`?
I want to know why the following only works with the scripts 1 and 3 and not with the 2. I want to use this because in my project I can't use $scope.
Thank you!!
<script src="https://ajax....
-3
votes
0answers
17 views
how to sum ng-repeat sum values and add in total
how to sum item.cost show in total when i change 2 + 2 its how old value 19 not 4
<tr ng-repeat="item in submittedinvoicesCtrl.current_job.invoice.work_items">
<td><input type="...
0
votes
3answers
38 views
how to call method inside $http body angularjs
I want to call editopenComponentModal in my other method its show error angular.js:13920 TypeError: Cannot read property 'editopenComponentModal' of undefined
EditCurrentJob(job) {
this....
0
votes
2answers
23 views
Angular: referencing my data in the controller
I am not sure how I pulled this off but I've got an object displaying all my data in the view, but no reference to it in the controller.
I assumed my data was in $scope or in this, but not that I can ...
-3
votes
2answers
25 views
AngularJS Error: $injector:unpr Unknown Provider. edited
Now i have added code in the question.
controllers.js
services.js
and getting this error.
angular.js:13642 Error: [$injector:unpr] http://errors.angularjs.org/1.5.6/$injector/unpr?p0=%24scopeProvider%...
0
votes
0answers
16 views
How can i back-port angularjs directive features from latest version?
I am new to Angularjs, how can I back-port 'md-datepicker' directives features of angular material version1.1.1/css to angular materail version1.0.1-rc2/css, please suggest easy way to do it. Thanks
0
votes
0answers
18 views
AngularJS 1: testing promise resolution to component scope
I am relatively new to angular testing and I am trying to test a simple component which, after getting json data through a $http call, updates the $scope on promise resolution:
app.component('...
0
votes
0answers
47 views
angularjs Scope is losing value?
I have a form that intakes an address along with some other data. I would like to send the address through google geocode for lat and long. then pass all the data into my db. So I can perform all the ...
0
votes
1answer
15 views
Angularjs Promise.all not updating scope, while $q.all does
I am using Angularjs 1.3.7 and just discovered that Promise.all does not update angularjs view after a successful response, while $q.all does. Is this later changed since Promises are included in ...
1
vote
2answers
72 views
ng-click function not able to call service
I'm retrieving data from the web-api on click of a button but when i execute this code i get error 405.
var app = angular.module("angularApp");
app.controller("loginController", function ($scope, $...
0
votes
0answers
31 views
Angular Getting access to variable via this?
I have my state example with the js:
app.config(function ($stateProvider) {
$stateProvider
.state('example', {
url: '/example',
templateUrl: example.index,
...
0
votes
2answers
30 views
AngularJs - ng-options object.object
I am displaying countries and cities in a select box in angularjs, which are working fine. ng-model of country displays the output when I call {{country}}. However ng-model of city couldn't be called ...
0
votes
1answer
69 views
Global variable is not updating in angularjs
I'm trying to fetch an user input from HTML I'm trying to update the getPlace variable to whatever user inputs which is stored in this.findPlace , it works perfectly if I do console.log(this.findPlace)...
0
votes
2answers
21 views
how to validation credit card in angularjs
how to validate credit card number... less then 16, month 1 to 12, ?? please help angularjs
see below code and image
<td><input type="number" class="form-control" id="inputDefault" ng-...
0
votes
3answers
23 views
Scope true in directive giving wrong result
I am using scope as 'true' in a directive. So now, this directive scope passes from parent to child, but not in reverse. I am printing now scope.name 2 times. First in parent scope, second in ...
0
votes
1answer
14 views
Angular: Access variables from outside scope of ng-repeat
I am having issues accessing variables (attached to $scope) inside ng-repeat loop. My ng-repeat is as follows:
<div class="row" ng-repeat="Message in Messages">
<p>{{ Message.Sender ...
0
votes
0answers
3 views
it is displaying angularjs binding expreesions on browser
///
var app=angular.module('demo',[]);
app.controller('myController',function($scope){
$scope.message="welcome to angular ja";
});
0
votes
1answer
23 views
Parent and child scopes in angular
Can anyone please provide me with simple examples to understand parent and child scopes in angular better?
I have tried the following but it prints hello {{person}} as output.
<!DOCTYPE html>
&...
0
votes
1answer
63 views
How to implement 'Open on focus' and 'monthpicker' to Angularjs calendar?
I am new to Angularjs, how can I add open on focus implementation (similar as Microsoft Windows 7 calendar) to my calendar as given below where we using Angular material version1.0.1. We decided not ...
2
votes
1answer
29 views
Reuse function Angular 1
Let's say I have 2 lists of items: available items and associated items.
now I want to write a search function that calls API methods that do the search for each list (different methods).
I want to ...
0
votes
1answer
53 views
Angularjs: open on focus and month picker feature to calendar?
How can I add open on focus feature(similar as Microsoft windows 7 calendar) to my calendar as given in demo where we using angular materiel version1.0.1, please help me with solution.
Thanks In ...
3
votes
2answers
41 views
Understanding Hierarchy of the $scope in AngularJS?
When I create a object and navigate through the _proto__ property of it I get to know that it has been inherited from Object
Now when I create a new object and inherit the obj object, then I get the ...
0
votes
0answers
21 views
Reload the angular view from controller only once
I am trying to go to a view and then reload that view from the controller exactly once.
What I have done looks like this.
function checkForReport() {
if ($rootScope.reportCounter) {
...
0
votes
0answers
34 views
Angular use variable before running rest of the code
I know the problem is the order of execution, the scope fires async and loads the data after the rest of the code has been processed. I have a httpGET that gets the information from a web service and ...
0
votes
0answers
37 views
AngularJS Scope Function Call [duplicate]
I have an angularjs controller. I added a function to it's scope, since this function is called from the html.
$scope.search = function() {
//do something
};
But I need to call this function ...
1
vote
2answers
50 views
Issue with Isolated scopes in angular
I am trying to run this program and I see no output. Can you please let me know what I am missing here. Thanks in advance.
<html>
<head ng-app="myApp">
<title>Test</title>
&...
0
votes
2answers
22 views
Angular UI Bootstrap 2.3 Modal is not rendering sightly parameters
I am having a compatibility issue with Angular UI Bootstrap Modal and sightly Parameters. When I try to render the sightly parameters inside the Modal the modal does not render the value in the ...
0
votes
1answer
22 views
How to write <script> in $scope style
I'm implementing google map into my ionic app, and I have a script in my index.html, which, will only allow the map works in the index.html.
But I need my map in my templates file route.html instead, ...
0
votes
1answer
42 views
String Concatenation in Angular
Simple question, but struggling to find an answer.
HTML
<div class="col-sm-5">
<input type="text" class="form-control" placeholder="key"
ng-model="main.key" ng-change="updateJson()">
&...
0
votes
1answer
28 views
AngularJs $http.post() does not send data if i sending data is huge
AngularJs $http.post() does not send data if i sending data is huge
I want to store one task to my db. If amount of data in assignedMember is more than 175 it will not send got 404 error but If ...
0
votes
1answer
16 views
Angular Directive - Scope Breaks after adding directive
I am going through this tutorial.
https://code.tutsplus.com/tutorials/mastering-angularjs-directives--cms-22511
For some reason when I add my directive.
myPerfectDirective
It breaks the scoped ...
0
votes
1answer
14 views
Utilize current controllers scope and parent controllers scope in $scope.$on
I am currently broadcasting to a child scope(from one parent controller to a child controller). In the $scope.$on
app.controller('myCtrl')
$scope.$on('broadcastName', function(e, d){
...
0
votes
1answer
54 views
how to access a variable out of function
I need
batchdata:{course_name:"xyz",batch_fees:"1200",---,course_id:"xyz123"}
to sent database but I'm having problem to send course_id along with batchData for that I'm taking course_id from ...
0
votes
1answer
21 views
Angular.js can't focus after state changed
Our UI is a little buggy. When we load the page the first time everything works perfectly. When we switch - in our case restaurants - the model is update and we can't focus the input fields. Any idea ...