In AngularJS, a scope is an object that refers to the application model. It is an execution context for expressions.
0
votes
0answers
9 views
Angularjs:open on focus feature to my 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
37 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
20 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
32 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
38 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
1answer
16 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
21 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
41 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
26 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
53 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
0answers
19 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 ...
0
votes
1answer
16 views
From run block can i able to call angular scope function inside another controller instead of $rootscope
I need to call angular Scope function inside some controller from runblock. can i able to call the function or else need to use rootScope or $scope.apply.
First method:
myAPP.run(function ($...
0
votes
1answer
29 views
How to access objects returned by a service from within controllers
I have a service that returned array of objects to a controller , the console
showing the below response :
Array[0]
0
:
Object
first_name
:
"Emi"
id
:
"255860959988416847"
last_name
:
"Hauritz Seino"...
0
votes
1answer
32 views
Angular 1.5 component issue - how to 'reset' a function coming from its controller when changing to another state?
I have an Angular 1.5 component with a controller (which uses controllerAs syntax), where I wrote a function adding additional css class to the component element if a certain html element exists in ...
0
votes
1answer
37 views
Hiding navbar based on current path with AngularJS ($scope vs. controller as syntax)
I'm working with the Inspinia Admin Theme (AngularJS Version) and have the following Problem.
I'm trying to show or hide the navbar based on the current path. The Problem with my first approach (...
1
vote
0answers
33 views
Get ngModel value from $scope without it's exact name
What I need is to get value of my model from my directive
<input type="number"
placeholder="must be numeric"
class="form-control"
name="meter_count"
ng-model="sllr....
-1
votes
2answers
44 views
scope into variable - Javascript
I have a text box that passes the user input into a $scope. I need to pass this further along into a firebase query, but im having trouble getting the variable to register the input stored in $scope. ...
0
votes
1answer
21 views
add a new property in ng-model object after it's been changed via ng-repeat
I wanted to add a property "discountRate" to ng-model object after the object is changed within a ng-repeat block.
Example 1
Example 2
After selecting an option the ng-model is updated as expected. ...
0
votes
2answers
31 views
View is not refreshed after $scope is updated in Firebase promise
I am using Ionic Framework and Firebase is my BaaS.
Controller:
.controller('ProfileCtrl', function($scope, AuthService, DatabaseService) {
console.info('** ProfileCtrl **');
var user = firebase....
0
votes
1answer
25 views
Rendering part of component outside of the component itself
I have JSFiddle like this:
https://jsfiddle.net/ownvjjow/
Basically the problem is that I'd like to render some part of component x outside of the element(x) itself. Like in the outer scope, but ...
1
vote
2answers
47 views
Interpolation in Angular JS
I am trying to understand Interpolation concepts in Angular JS and I have written this code. I am trying to enter a text in input box and based on the template in text area tag it should replace the ...
1
vote
0answers
35 views
Is it better to use directive with or without isolated scope for a custom input field validation directive? [closed]
I have a directive for checking form validation.
Requirements are
Check if ngModel value is empty.
Call a function only if all values are filled.
Also set a variable true or false based on the ...
0
votes
1answer
31 views
AngularJS ng-click is not working with $scope variable
Can't get my bottom div to show.
tried all the suggestions in SO from this year. Added a variable to $scope, tried $scope.apply(); , etc.
<nav class="navbar navbar-default navbar-fixed-top" ...
2
votes
2answers
50 views
checkbox selected true by using condition
I am new to Angular
this is my data
$scope.checkgoogleKeywordIdsData=[
{"AdGroupId":"37446130209","Id":"41941982"},
{"AdGroupId":"34657098157","Id":"1275289507"},
{"AdGroupId":"37446130209","Id":"...
0
votes
1answer
26 views
Scope name is {{currency}}, how to get specific value in view
The scope name is :
{{currency}}
I coded this in view. the output is:
[{"code":"USD","value":"0.00670000"}]
I want to get only value USD in front end.
0
votes
1answer
48 views
After refreshing page how to store $stateparams param value in Angular Js?
In button click event my state is going to change from one state to another.thats way I am passing Id value by using ui-sref.
this is my button declaration for id:-
<button ui-sref="list({id:...
1
vote
0answers
15 views
AngularJs how to access attributes of objects with numbers in its name? [duplicate]
I have an issue to access object property that has numbers in it's name , below sample code is a response of Pinterest API , i can access each property except the images URL . error raised because of ...
1
vote
1answer
39 views
How to get the actual value of an angular expression
For example I have an angular expression:
{{download.name}}
I want to get its actual value instead of its reference, which is "demo.txt". This element is generated like this. Its value changes with ...
-2
votes
1answer
37 views
how to upload image when its show 500 error in angularjs
i want upload image but its show below error how to solve this problem, because other format of html working fine ..i want use in angularjs
500 (Internal Server Error)
<input type="file" name="...
1
vote
3answers
22 views
AngularJS multiple Scope needed for Autocomplete
I have an array structure like this.
[
{
"id": "1",
"name": "John",
"city": "NY"
},
{
"id": "2",
"name": "Gerold",
"city": "LA"
},
{
"id": "3",
"name": "...
0
votes
1answer
52 views
not able to execute $http method in angularjs
I m trying to get the data from web-api. While running on a single html page i am getting the response back with the data but if this script is written separately(out side the html page) i am not able ...
0
votes
1answer
31 views
How to execute Angular ng-click directive inside custom component on enter key press
I have a custom icon component using isolate scope where a user can define what he or she wants to happen on ng-click:
<ers-icon name="history" ng-click="ctrl.clickAlert('history')"></ers-...
-1
votes
2answers
19 views
Ionic PopUp : TypeError: Cannot read property 'confirm' of undefined
I would like to code a simple "confirm ionic pop up", but I had this issue that I can't solve. I'm sure if you take a look you'll find it out, because now it's like I was totally blind against it ...
...
2
votes
2answers
25 views
Newbie AngularJS Controller $scope cannot read property of undef
I'm trying to solve a problem obviously some of the newbies with Angular experience sometimes. Even there are several posts I did not find the problem with my small example. Scenario:
webpage that ...
1
vote
1answer
22 views
I cannot display google map markers
I cannot display google map markers on map. What's wrong? it is been a day :( Am I doing something wrong? please help It is really annoying and I am newbie to angular. I am able to display complete ...
0
votes
0answers
20 views
Angular isolate scope confusions - functions are undefined
I'm trying to create a tree-like structure with angular directives:
profileApp.directive('adminList', function() {
return {
restrict: 'E',
replace: true,
scope: {
...
0
votes
0answers
9 views
Requiring sibling directives to be initialized sequentially
I am trying to create a modal which has "pages" (each page is a "step" and there is a distinct order). Each page is defined by a directive with it's own controller and template. I want the modal to be ...
0
votes
2answers
38 views
angularjs clear filter for ng-repeat
I have this ng-repeat condition:
<tr ng-repeat="(k, v) in loanapps | filter:{LoanStatus:SelectedStatus}:true track by $index">
<td>
{{v.Id}}
</td>
<td>
...
1
vote
2answers
30 views
Filter not working in ng-repeat angularjs
Does anyone know how to filter in ng-repeat, the code is below. I want to filter with profile.full_name.
<tr ng-repeat="job in customerjobhistoryCtrl.Jobs | filter:{customer.full_name: Profile....
0
votes
1answer
25 views
How to pass data between main.js and directory?
i need to know how to pass data between main and directory.
what I wanna do is to active the directive automaticly when main.js start on load.
directive code:
angular.module('dmv.shared....
0
votes
0answers
14 views
Is there a cost associated with switching between isolated scopes?
For example if you have several isolated scope directives within a single page that all listen for the same broadcasted event will there be a performance cost associated with the context switching ...
0
votes
3answers
45 views
AngularJS: $scope vs this: what is the use of $scope?
I found this in AngularJS style guide
Prefer using controller as syntax and capture this using a variable:
That means that I can assign all my functions and the model to the controller via this ...
0
votes
2answers
30 views
Angular $scope property gets overwritten when passed into function as an argument
I have an odd situation that I can't seem to figure out.
In Angular 1.4, I have a variable on the scope object used as a model to collect form data, $scope.videoModel. When a form is submitted, ...
-5
votes
1answer
35 views
How to upload image using AngularJS [closed]
I am uploading image my code working fine when I use below HTML
<html>
<head></head>
<body>
<form action="http://www.example.com/customers/5832e319f1f1e5cc296e8802" method=...
0
votes
2answers
34 views
Not able to change path using $location service even after using $scope.apply
I am wondering why I am not able to change my view using location service even after I use -
$scope.$appy() or $scope.apply;
I did research before posting my question. I got results of similar ...
0
votes
0answers
41 views
AngularJS - Not showing new values
I have one test01.html page. When I click on Next button of test01.html page they call one Java Service and that service return one key, name is changeList and I just display this key value into my ...
0
votes
1answer
17 views
Cannot add controller in angularjs which is defined in separate file
I am newbie to angular. Currently all of my controllers are defined in following controllers.js file on following patterns
function A($scope){.....}
function B($scope){.....}
function MainCtrl($http) ...