Tagged Questions
0
votes
5answers
33 views
Angular JS - Convert Json Date and Apply Scope to model
I am creating a simple CRUD using AngularJS and facing a minor issue. While editing a form I am getting json string returned by server in model and I have created my custom directive to format that ...
0
votes
1answer
25 views
AngularJS ng-grid - Dynamically updating the columns and results
I am newbie in ng-grid. How do we dynamically update the columns and results inside the grid.
I have created a http://plnkr.co/edit/CwUVIzSKVNCMTgpOW87f?p=preview
Script
var app = ...
0
votes
1answer
22 views
Viewing fixed header on mobile device
Hi my website has a fixed horizontal nav bar and I'm having problems scrolling it on a mobile device when I zoom in. I did research and the only way to fix this issue is to use javascript.
I found a ...
0
votes
0answers
30 views
AngularJS Nested Ng-repeat Counter Decrementation
I am trying to decrement a counter within a nested AnguarJs ng-repeat. I know it is a problem of scope, because the increment in the outer ng-repeat works fine, but in the inner ng-repeat is where I ...
1
vote
2answers
29 views
Two way data binding between controller and external directive
My setup:
Imagine a controller for a shopping cart:
app.controller('CartCtrl', function ($scope) {
$scope.data = [
{
id:0,
title:'article1'
},
{
...
1
vote
1answer
22 views
Angularjs : Loop all isolated scope Directive Templates, on click of one
I have html:
<div ng-repeat="mydata in data" class="ng-scope ng-binding">
<p class="ng-binding">{{mydata.postdata}}</p>
<div my-rating rating-value="rating" ...
0
votes
1answer
27 views
AngularJS Calculated field from hidden fields
I'm creating a form in angularJS with a calculated field whose value is given from 3 numeric field, one of which is hidden, and it's visibility depends on the input of another.
My problem is that as ...
0
votes
0answers
43 views
AngularJS view just render correctly after screen interaction
I have an Angular App with two controllers that updates two models every time a new info is sent by server. To clarify, the same info must be updated in the same view, but two different scopes. In the ...
3
votes
1answer
30 views
Directive Isolate Scope 1.2.2
I'm working with Angular version 1.2.2 for the first time and trying to make a simple directive that uses isolate scope with '=' binding to pass in an object. I've done this a few times before so I'm ...
0
votes
2answers
60 views
The scope.$watch item doens't work for fields of javascript objects
I faced with problem of watching properties of java script objects. Partially I described this problem here, but I didn't get solution...
I will describe the problem another way. Here is fiddle
Here ...
0
votes
1answer
25 views
ng-show is not working in table while the same statement working in div body
I have two tables inside a div element. I want to hide both the tables when template loads. and want to show them based on conditions. for this i created two tables inside a div and placed ng-show ...
0
votes
0answers
51 views
watch changes on JSON object properties
I'm trying to implement a directive for typing money values.
var myApp = angular.module('myApp', []);
var ctrl = function($scope) {
$scope.amount = '0.00';
$scope.values = {
...
0
votes
1answer
25 views
Load value from db on rendering directive template
I am stuck in a doubt
I have html :
<div ng-repeat="mydata in data" class="ng-scope ng-binding">
<p class="ng-binding">{{mydata.postdata}}</p>
<div my-rating ...
1
vote
1answer
50 views
Angular.js missing $scope update on page load
I've got a bit of an interesting situation where I have a weather app, and on loading the app, I want to get the users last position, and the last forecast they saw, and display that, while the app ...
0
votes
2answers
28 views
AngularJS select tag not populating with object data when in ng-repeat
I have an issue with angularjs's select directive.
Here is my code:
<ul class="thumbnails">
<li class="span4" ng-repeat="product in productsDTO">
<div ...
0
votes
0answers
35 views
Angular 1.2 no longer allows multiple isolated scope directives on same element?
I have some code in an Angular project that use two separate directives with isolated scope. They do not need to share scope, simply exist on the same element. They both alter the DOM in slightly ...
0
votes
2answers
35 views
Using angularjs $scope in the get url params collection?
AngularJS newb here, working on my first app (with .NET on the server). I want to call the WebAPI and pass it two parameters stored in $scope, but it won't do it. If I hard code the values it works ...
0
votes
0answers
24 views
Sharing isolate scope with nested directives in Angular
I want to have a custom directive that is reusable and creates an isolate scope so it can be used anywhere (as long as the consumer uses the API defined by the directive). Then, I want the consumer ...
1
vote
1answer
32 views
isolate scope '=' not getting assigned
I have the following directive:
CorrelatorApp.directive('correlator', function ($WebApi) {
return {
restrict: 'A',
scope: {
crOptions: '=',
},
link: ...
0
votes
1answer
20 views
Angular Provider config with data from ng-init
I create a Provider to wrap pusher javascript in angular. I want to configure my pusher key from my play 2 server. Right now, I pass the key using ng-init. But how could I assign this key to the ...
0
votes
1answer
29 views
Directive Inside another directive. Controller can't watch
I have 2 simple directives...
the parent directive:
.directive('modal', [function () {
return {
replace: true,
scope: {
/* attributes */
},
templateUrl: 'modal.tpl.html',
transclude: ...
1
vote
1answer
14 views
AngularJS: Getting text from TD in directive attached via an attribute and raising event in controller $scope?
I seem to have a small issue. I have created a directive and inserted the directive via an attribute on an existing DIV, see below.
<td my-directive>This Text I want to get hold of in my ...
0
votes
1answer
15 views
access child scope property in another child in angular js
is it possible to access sibling properties in angular js? I have a parent and two children
My parent is my parent div
children are:-
1. <li ng-repeat= "item in list"/>
2. and within ...
1
vote
2answers
44 views
How to get analytics api to call my callback (which isn't in global scope)? (Using angular)
I am using analytics API
using: <script src="https://apis.google.com/js/client.js?onload=handleAnalyticsAPILoaded"></script>
This is great, but the callback only works if the function ...
1
vote
2answers
65 views
If else conditions in angularjs templates
I am quite new to AngularJs. I am working on a Q&A Application where i have to render some questions and its answers in the form of a table. I have three Types of questions which I have to render ...
0
votes
0answers
14 views
GWT with AngularJS and History Support or Deep Linking
I have a Web application which is built using GWT as a client side technology. This works as a single page app without browser's history/back-button support. It is not, we didn't want to have it. But ...
2
votes
1answer
44 views
Angular - Using one controller for many coherent views across multiple HTTP requests
I have a simple Angular JS scenario. I show a list of experts in one view, and that list contains actions to edit an expert, which would be done in another view. These views are coming from server and ...
0
votes
1answer
30 views
Conditional logic in compile or link function of angular js directive?
I have a JSON object in $scope called data. The object has a member called items which may either be an Object or Array of Objects. For this reason I can't use ng-repeat:
<ul>
<li ...
4
votes
1answer
83 views
AngularJS - Deep object' property deletion
I know how to set object' "deep" property with $parse service , like in this post.
But how can i delete a deep property ? Not assign it to null with this:
...
2
votes
1answer
41 views
configure angularjs module to send patch request
I am totally new to AngularJs. I am trying to send a PATCH request using Angularjs to Django Tastypie API's. My code is
var module = angular.module('myApp', []);
module.config(function ...
0
votes
0answers
31 views
Why http request call error callback
Why http request call error callback when data is returned from server? My code:
var app = angular.module('app', []);
app.controller('MarkerList', ['$scope', '$http', function($scope, $http) {
...
0
votes
0answers
33 views
Difference between using “this.$scope.x” and “this.x” with ngControllers? [duplicate]
Edit: I eventually worked out what I was trying to answer. The short of it when you use the "controllerAs" (either in routing, or in templates as MyController as X), the controller gets added to the ...
-1
votes
1answer
29 views
AngularJS scope defined function is null
I have a function defined in my controller that get's bound to an a element with ng-click, the li element in which the a element is nested also has an ng-repeat directive.
When I inspect the $scope ...
0
votes
1answer
41 views
passing model value from ng-repeat to ng-include to a directive using “=” in scope fails
i have the following code in my homepage
<ul>
<li ng-repeat="item in list" ng-bind-html-unsafe="item.Content" ng-include="item.Template" > </li>
</ul>
the value of ...
-1
votes
1answer
38 views
angular TypeError: Converting circular structure to JSON
Hi I have a small Angular app like so:
// html
<div ng-repeat="project in projects">
<h3>{{ project.id }}</h3>
<h3>{{ project.title }}</h3>
<div ...
0
votes
2answers
71 views
How do I access ng-model values inside my directive template?
I have a directive with a template that looks like
<!-- selectList.tpl.html -->
<div ng-if="selectList">
<p>Id: {{$id}}</p>
<p>Current list item ...
1
vote
2answers
27 views
Angular directive: bind to variable in parent scope
Angular directive demo:
jsfiddle
<div ng-app="myApp">
<script>
function Contrl($scope){
$scope.parval = 0;
$scope.items = [
{id: 1, text: '1'},
...
0
votes
1answer
39 views
AngularJs one controller for multiple DOM/scope
Maybe tricky title...
For example lets use Google Maps Api v3.
I have array of JSON objects with coordinates and information for various cities.
What if i want to create ONE controller for all ...
0
votes
2answers
40 views
Angular repeat bind to independent objects
I have a small Angular application which repeats a list of project objects and allows editing each individual object.
// app.html
<div ng-controller="ProjectsCtrl">
<div ...
0
votes
2answers
47 views
Angular scope doesn't update when removing an item
I have a simple application where I can add users to a list and remove them.
The form to add a new user binds to $scope.newPerson. On submitting the form, I add the newPerson object to $scope.people ...
0
votes
1answer
22 views
angular.js Getting the element from inside $evalAsync in directive
I'm finding that I'm using scope.$evalAsync inside a directive quite a lot. Mainly to do DOM stuff/jquery plugins that need all the template {{vars}} compiled.
I can get at the scope object from ...
1
vote
0answers
44 views
In Angular JS, can we use ng-controller twice? [closed]
I' am trying to develop an web application using Angular JS. I' am trying to create two Angular JS controllers in the same page but things seems to be not working. Please can someone tell me where I ...
1
vote
1answer
20 views
How Can I break a retryQueue in angularJS?
What is the purpose of retryQueue and I want to know is there anyway to break retryQueue in angularJS.
Please revert asap...
2
votes
2answers
34 views
angularjs - understanding $ mark and services
I've been doing the tutorial from angular page but I don't understand why services (like $scope, $http) have names which begin from $ ?? what this $ mark means in context of angular? If I write own ...
0
votes
0answers
26 views
AngularJS: How to tell if custom directive's scope a child scope of ng-repeat or parent scope?
I have a custom directive that I'm using $parse on the attribute's value, which is an expression for a list to be used to add items to an unordered list. The problem I'm having is in the link ...
0
votes
1answer
53 views
Anular JS controller scope, mulptiple views
For a dashboard type project (one page, multiple smaller views of different models) we are using among other tools the Angular framework.
The problem consists of the following:
I have a ...
1
vote
1answer
38 views
AngularJS document ready not functioning
I'm trying to add a jQuery listener on a button that is being printed with AngularJS, the listener fails to work since the element is not yet available on DOM:
var app = angular.module('myapp', []);
...
0
votes
2answers
60 views
angularjs multiple controllers on one page
I have a page with multiple controllers, one of the controller is being used in 2 different divs within the same page. I am not sure if it is a scope issue or I just miss something in my code.
here ...
0
votes
1answer
22 views
How do I update the scope of a service?
Here is my code:
angular.module("testApp", [])
.service("testService", function() {
var privateScope = [1,2,3];
return {
getScope: function() {
return privateScope;
...
0
votes
1answer
104 views
How do I generate child controllers based on the scope of a parent control?
I am designing an interface that displays a list of panels, each with its own model. I want to be able to render each panel so it has its own model using the model from the parent controller.
...