Tagged Questions
In AngularJS, a scope is an object that refers to the application model. It is an execution context for expressions.
0
votes
0answers
6 views
Getting access error when get the content from Angular Rest call (Http Get) to
I'm trying to get the content from Stash api using angular rest call showing below,
But, Im get I'm getting below access error :
XMLHttpRequest cannot load
...
0
votes
1answer
13 views
Using ng-change in AngularJS with “Controller As” syntax
I am trying to avoid using $scope in my controller function, instead opting to use
var viewModel = this;
with "controller as" viewModel syntax.
My problem is that I need to use ng-change to call a ...
0
votes
0answers
6 views
How to move up and down items using angular js AND strongloop
I am using angularjs and StrongLoop generated lb-services api to update my persisted store.
I have implemented move up and move down of items in Angular by applying to the $scope array, the simple ...
0
votes
0answers
17 views
Angular nested directives scope not shared
I have my input directive which takes the input value from html, and updates the angular model:
.directive('input', function($parse) {
return {
restrict: 'E',
require: '?ngModel',
link: ...
0
votes
1answer
13 views
Dropdown select options translation in angular-js for multilingual site
I have set of options to bind to a select box.
Say the array is defined like whose content is to be bind to the dropdown.
$scope.options = [
{ City: "en", },
{ City: "nl" },
...
1
vote
4answers
22 views
AngularJs Controller not linking to view
I can't understand why the text I type in my controller is not linking to the view.
I created two javascript files. app.js and MainController.js
I followed a tutorial from Codecademy to replicate a ...
0
votes
0answers
32 views
how to math.pow function in input field using angular?
I make a simple example of calculator in which user type anything on input field and remove the focus from input field than it given output in input field.But there is problem in that I am not able to ...
0
votes
1answer
27 views
Angular and dynamic HTML
What's the best approach for a page that has dynamic HTML and Angular? I mean, I'm using DataTables.net for showing search results and I need to be able to edit each cell using Angular. Of course that ...
2
votes
1answer
53 views
“RangeError: Maximum call stack size exceeded” in During Complex JSON processing
I'm working on the report page which have to process a big JSON Object. This JSON object may contain at least 500 to 600 inner JSON objects. I have to iterate them all and have to display them in my ...
0
votes
4answers
45 views
Angularjs best practise - $scope vs this
I'm trying to follow best practise but have a problem understanding when to use $scope and when to use 'this'. I have a simple example using angularjs 1.4.8.
<!DOCTYPE html>
<html ...
1
vote
1answer
27 views
On event executed multiple times after compilation
I have this directive:
myApp.directive('someDir', function($compile){
return{
restrict: 'A',
replace: true,
link: function(scope, element, attrs){
...
0
votes
0answers
37 views
Custom angular directive within ng-if not being displayed
I have an issue with one of our custom directive (alert-animate) not being displayed.
The issue occurs after the popinState changes to inprogress and back to update. Somehow the custom directive does ...
3
votes
0answers
18 views
How to load dynamic Tabs in ngDialog box in angularjs?
Dynamic Tab Sample File Link -- Not Working
Static Tab Sample File Link -- Working
In NgDialog Tabs Not Showing
In above link I added the sample file for ngDialog model with tabs. In index
...
1
vote
1answer
20 views
$scope.watchCollection with if statements removes array data
So I am running into a bit of confusion with the watchCollection statement. I am running an watching a change in an my array objects and I am noticing whenever I use an if statement within the $watch ...
0
votes
1answer
5 views
How can I defer a nested state / templateUrl load?
I have a nested ui router state (a ui-view within a ui-view) - How would I go about defering the load of only the child state?
The preferred scenario would have the child state simply waiting for an ...
0
votes
1answer
25 views
Get json data from url
I have following part of code which works fine. Now I want to get my "list" from specific url which response with json data.
(function() {
var app, list;
list = [
{
'name': 'Foo',
...
0
votes
2answers
32 views
Calling multiple REST APIs using response of first API in AngularJS
I am new to AngularJS and trying to make an application which loads data by calling APIs. It is like I am fetching the list of boxes of type A (Resource Groups) and then each Box of type A has ...
0
votes
2answers
34 views
How to access variables in angularjs $http service
I have my controller and it fetches data from 2 json files using $http service.
This data is stored inside $scope variables like $scope.name and $scope.application.
But I am unable to parse over both ...
-3
votes
0answers
24 views
directive handle dynamic content using AngularJs
I need to insert this code into directive:
<link rel="Stylesheet" type="text/css" href="CSSHandler.ashx?ModelIdentifier=bikester" />
<style type="text/css">
table
{
...
1
vote
0answers
18 views
Angular / UI-Router - How can I defer the load of a nested view, but not its parent?
I have a setup where I am toggling various views on a base level for multivariate testing purposes. I am using nested ui-view's to accomplish this without issue, however in one layout I'd like to ...
4
votes
3answers
44 views
Dropdown binding with angular
Suppose I have this controller:
myApp.controller('testCtrl', function ($scope) {
$scope.cars = [
{ carId: '1', carModel: 'BMW', carOwner: 'Nader' },
{ carId: '2', carModel: ...
0
votes
1answer
22 views
Angular controller functions are both constructors and a decorators?
If one writes a controller as ctrl for the following code:
function Controller($scope) {
$scope.abc = "123";
}
angularApp.controller("controller", Controller);
Does the pseudo code below ...
2
votes
2answers
34 views
Angularjs not updating variables
I want to display/update the calculation answer directly without the need of aditional buttons.
Or do i need a function and button to apply the changes?
<div ng-app="myApp" ...
0
votes
0answers
17 views
Does the template function generate new child scopes?
I'm trying to replace the ng-repeat directive with a custom one written by me. Here is the definition object link function:
//directive definition object...
//...
///link: function ...
1
vote
0answers
19 views
Get image height Width of image after it has loaded images in angularjs template
I am calling the renderimage function on ng-Click so that i get the height width of the image and i can apply to its parent container div. beacuse the slick carousel is not properly rendering the ...
0
votes
1answer
32 views
AngularJs access scope variable in another function
I am new to AngularJS and have this following piece of code that I need to edit.
scope.findData = [];
scope.clientId;
scope.identityDocuments_a = [];
scope.getClientIdentityDocuments_a = ...
1
vote
2answers
27 views
How can I create a directive that will style data with transcluded HTML
I have what I believe is a very simple desire for a directive: to take an array or object as a directive attribute and then allows the user of the directive to decide how to format/style the data ...
0
votes
0answers
27 views
Send scope data to custom event anguarjs
I need an event that executes when the user press enter on the element and there is an answer to that question already. But the situation here is that the only thing that I can pass to the callback is ...
2
votes
1answer
37 views
Can we remove/delete controllers, services, factories, directives, etc? [on hold]
I am trying to clear the javascript memory of my app as far as possible. I am thinking if I can remove/delete controllers, services, factories, directives, etc and their scope variables after their ...
0
votes
1answer
26 views
how to get current and previous date in angular?
I am using date picker in angular ..which is working fine .But I need when user type "t" or "T" it show current or today date ..And if user type "t-1" ..it show yesterday date ...Same when user type ...
0
votes
0answers
23 views
AngularJS & Modules - Can access controller properties, but can't fire events
I'm using browserify to include my controllers etc. as modules:
var app = angular.module('app', [...])
var LoginCtrl = require('./controllers/Login');
Where I define said controller as follows:
...
0
votes
1answer
25 views
$scope doesn't update when using ng-if
On Angular 1.3.x I made a select input that calls a function on ng-change. The surrounding has an ng-if statement.
html
<div class="form-group" ng-if="property">
<label ...
0
votes
0answers
11 views
Monitor progress in service to update controller scope / view (AWS S3 progress)
I'm making a call within a factory to AWS S3 to upload to a bucket. I know that I can monitor the progress of the upload with something like:
.on('httpUploadProgress', function (progress) {
...
0
votes
1answer
12 views
Using text input as filter option
I struggle with the usage of the filter. I have an input field that i want to use as a filter option.
The array looks like this:
$scope.Examples=[
{
name:'Dolly',
place:'roof',
...
0
votes
2answers
30 views
Passing object from spring controller to ANGULARJS
I'm trying to create a CRUD system on a list and I need to pass the list from the controller of spring to ANGULARJS controller.
Can someone point to the right direction pls?
P.S: I already can ...
0
votes
1answer
41 views
how to create dynamic form in angularjs?
My error description:
step 1: I am appending template using this directive.
step 2: Now I remove this appended template using this scope function "removeMilestoneDiv".
step 3: After submit my form. ...
1
vote
3answers
45 views
why filter not working in input field in angular?
I am tying to add filter in input field but it gives error ..I want if I type 1k in input field it show it text 1,000 in input field (value)..In other words if I type 1k ..it convert 1k or remove / ...
1
vote
2answers
33 views
How to do base class concept for CRUD in angularjs?
Currently Am doing student project in angularJS. In that I need to use base class concept
for CRUD operation.. I need to create one base class in that class contain
Create, read, update and delete ...
1
vote
2answers
50 views
Ng-click not firing in angularjs?
Here I created sample angular program for button click. but its not firing
may i know where i did mistake? can any one help me on this..
thanks
var myApp = angular.module('myApp', []);
...
0
votes
1answer
41 views
$scope value is not updating in model dialog
I am using angularjs and opening bootstrap model. I want to update my $scope variable and want to show it in model. But new value is not coming on model.
My code is,
View,
<li ...
0
votes
1answer
20 views
$scope var not updating on Parse update
I am building an app using ionic and parse. I am updating a boolean in parse based on a click. Everything works on parse end, I see the user object updated in the console after the function runs, ...
1
vote
2answers
29 views
Getters and Setters on angular.extend $scope
I'm reading an interesting article AngularJS: Tricks with angular.extend(), and there is explained how to use getters and setters with extend. But there are some points that I don't understand.
Js:
...
0
votes
1answer
35 views
Passing a form to a directive: undefined
I've got this code (updated)
HTML
<body ng-controller="MainCtrl">
<form name="form" novalidate>
<directive form="form.test" required
><input type="text" ...
2
votes
2answers
26 views
Undo in Angular Directive
I've built a directive has an object passed to it via bindToController, with the intent of editing it. Edit was working great until I needed to cancel an edit. To undo, I needed to create a shadow ...
1
vote
3answers
36 views
Unable to update the rootScope in angular
I am trying to send a request to a php file from one controller in angular and getting the response. I stored the response in a rootScope variable which is initialized in the controller.run() method ...
0
votes
1answer
27 views
directive unable to retrieve data from a service
I have a little SPA using angular. The concept is simple, after login, $routeProvider redirects to a home page where I have a homeController specified.
this is from my home view that is rendered by ...
0
votes
2answers
13 views
How to allow a number with digit limit and without decimal,and negative ina textfield using AngularJS directive
Here is my code.But its not working in my directive .Please help me to show errors
When initially run I enter characters(other than number) in two times it will allowed. For Eg press 'W' in two times ...
0
votes
0answers
22 views
Model Not binding in Popup
I've a issue with my Popup model binder. When popup's template is on the same page it is not binding values to my popup's template. But when I moved template to directive then it works fine. What will ...
0
votes
0answers
21 views
angularjs html5 mode pretty url not working
I am doing an angularjs application which was generated by web storm.
I tried to use html5 model pretty url (without # on url).It is not working.The url with # is working fine.
Here are my workouts
...
0
votes
2answers
43 views
How to allow only a number format(digits and decimal point) in the corresponding texfield uisng AngularJS?
I need a directive for this format
Eg 423.33 is valid number 423.333 is invalid allowed only positive numbers including 0.
But user should not to enter 0423.33
if it write only number without ...