Tagged Questions
0
votes
2answers
13 views
AngularJS trouble calling nested scope
So I'm playing around with AngularJS and wants to make two separate lists of skills. On list for my development skills and one for my design skills.
Problem is that I my data from the development ...
0
votes
1answer
13 views
Design suggestion for Add / Edit scenario in Angularjs
Here is my scenario. I have a addPersonController and editPersonController with addPersonView and editPersonView respectively. In both controller, I am uploading the Person's picture. My upload ...
0
votes
0answers
24 views
Understanding $scope mechanics in Angularjs
I can't clarify for myself how to deal with $scope in Angularjs. Although I've resolved my current issue other way, still I need help to get comprehension of $scope usage.
I have the following form ...
1
vote
1answer
15 views
AngularJS directive not inserting values into template when using an isolated scope
Given the following directive:
angular.module('news.directives', [])
.directive('newsArticle', function($location, $timeout) {
return {
restrict: 'AE',
replace: ...
0
votes
2answers
16 views
How can I take data from an external controller into a directive template?
I have a factory who provide data to a controller but when I call from the directive the data do not bind.
myApp.directive('user',function(){
return{
replace:true,
restrict:'E',
...
0
votes
2answers
21 views
AngularJS - Accessing var in a service which are defined in a controller
I have an angular controller which have a number of variables decalred. I am trying to access these in my angular service:
app.controller("MyController", function($scope, myService) {
var ...
0
votes
0answers
19 views
Render directive in parent controller defined in child controller
Basically i would like to achieve something along the lines of this:
<div ng-controller="ParentController as parent">
<render-page-controls></render-page-controls>
<div ...
0
votes
1answer
18 views
how does my-pane directive's scope get access to selected property in this example
In this official example, in section "Creating Directives that Communicate", in file my-pane.html, ng-show='selected' is used for determining whether the content is to be hidden or not.
My question ...
0
votes
1answer
17 views
Calculating date difference with angular filter
I needed to be able to calculate the difference between two days, inclusive, and display the difference. Ideally this would be via an angular filter so it can be used all over the application.
1
vote
1answer
40 views
AngularJS ng-model not working on dynamically created input fields
I've created a dynamic templateUrl for form fields and I'm trying to attach ng-model within ng-repeat. The parent directives and form field directive all work and are generated, but when I use ...
0
votes
0answers
22 views
Do individual button in Angularjs retain their own copy of the function in their scope?
I have a pretty simple button that tests an error message but turning it on in AngularJS (using no-show)—all of the classes are for bootstrap and animate.css
<div class="alert alert-danger ...
1
vote
1answer
40 views
how to store a reference to a object or a global object with angular?
I hope the title of this question makes sense. What i need is a way of storing a reference to a object in a controller and access it in another one.
For example, i have a AppCtrl where i initiate ...
0
votes
1answer
11 views
AngularJS “sendJavascript” cordova plugin call a factory function
I have a Cordova plugin that do some webservice thinks, and i want it to make a call a angular factory function on the WebView using the sendJavascript android command.
I have another project where ...
1
vote
0answers
21 views
Angular While enabling html5mode gives Error: $rootScope:infdig Infinite $digest Loop
When I try to remove # from the URL by enabling the html5mode gives the following error for the initial loading.
Error: $rootScope:infdig Infinite $digest Loop
when the html5mode is false ...
0
votes
0answers
5 views
How to do pagination in tree-grid-directive?
I am using following ‘tree-grid-directive’.
https://github.com/khan4019/tree-grid-directive
Is there any way to do client/server side pagination in tree-grid-directive? Or Is this support ...
0
votes
0answers
30 views
AngularJS scope data not displaying on partial html
I am facing one weird scenario while using angularJS. [new to AngularJS]
I am calling one function from my index.html which is defined in controller.js.
<li><a ng-click="casualShirts()" ...
0
votes
1answer
25 views
angularjs ns-show logic flow
I am a newbie in angularjs. I'm trying to show an html element depending on a property of the $scope object but without using any form element.
This is the snipped of code:
<div id="ListApp">
...
2
votes
2answers
34 views
Assigning value to scope in directive not working
I have a custom directive that may or may not have an attribute with a value. If the user doesn't specify a value for the attribute, I want to assign a default. However, when I do that the value is ...
2
votes
1answer
37 views
How to implement “Keep me logged in” functionality in AngularJS
I am working on AngularJs application and back end is developed in Ruby on Rails. We have not used Devise gem for User authentication. Whole user authentication process is written in AngularJs. Now I ...
0
votes
1answer
17 views
AngularJS: $timeout within directive's controller using “this”
Not sure if everything is wired up here correctly. The objective is to call the nextSlide function, for it to change the class, wait a second, then incrament the current picture by 1, and then change ...
0
votes
2answers
24 views
how do I reference a specific object in array that has changed with angular $watch
I am attempting to calculate the new total whenever price or qty change. I don't understand how to get a reference to the specific object that has changed.
$scope.parts = [{description: null, price: ...
0
votes
1answer
29 views
How to properly refresh scope when changing state in ui.router
I am using ui.router to manage the state of some pages on my app. When I change state I would like the controller to reload the objects in scope. However I am not finding a way to tie into state ...
0
votes
0answers
20 views
Refreshing $scope from provider
We are working on an Angularjs provider for our API. Our API offers the ability to use Server Sent Events to receive messages from our servers on the client side. Unfortunately, AngularJS does not ...
0
votes
0answers
18 views
Calling Flask route from Angular.js
I have a Flask application and an Angular.js UI.
I need some advice on how to call a Flask route from within an Angular directive passing some arguments for the Flask function to receive and process. ...
0
votes
1answer
41 views
How AngularJS filter and ng-model work in context of JavaScript?
I'm trying to understand AngularJS ng-model directive and I found this link
I'm not able to understand how filters are working internally.
Actually its
Any: <input ng-model="search.$"> ...
0
votes
2answers
28 views
AngularJS - Calculating length of JSON array
I have a set of JSON data and within it, i am trying to calculate the length of an array (Infos):
My JSON:
"Association": {
"Items": [
{
"AssocName": {
...
2
votes
1answer
34 views
Angular Scope Usage
I am a beginner in AngularJS.
I am working through some code of an expert.
I would like to customize the directive and learn something.
The expert always insert:
this.scope = $scope;
in the first ...
0
votes
2answers
22 views
AngularJS global $http state ajax loader
I have an AngularJS app, and need an ajax loader for every request done by the $http - is there a simple way to do this.
My solution now is to set $rootScope.loading = 1 everytime i call a $http, and ...
0
votes
1answer
16 views
Update directive's template on controller's variable change - angularjs
What I'm trying to do is to get a JSON object from a $http request, requested inside a controller, and build a directive that displays the multiple objects in the JSON object in a grid.
The problem ...
0
votes
0answers
29 views
Cannot read property 'year' of undefined in an angular directive
I'm trying to build a form in angular js, I found this nice script from Irvick on git hub https://gist.github.com/lrvick/8789669 to ask credit cards detail and I'm building mine on top of this.
This ...
1
vote
0answers
12 views
flipcard within angularjs directive with limited scope
I have this html code with CSS. I want to put this in a directive template and re-use the directive, limiting scope to each element.
<div ng-controller="flipCtrl">
<div ...
0
votes
1answer
24 views
ng-init not working inside link function of directive?
According to this Plunkr, using ng-init in a directive won't execute a function assigned to scope inside link, but it will if I do it in controller. Can anyone explain this?
app.js
var app = ...
0
votes
1answer
18 views
Can only assign functions to scope inside directive in controller function, not link
I've just run into an issue where it seems that I can only assign functions to scope and execute them if I do it inside the controller function of a directive, but not in link. Plunkr example here.
...
0
votes
1answer
29 views
Angularjs: though ng-click triggers, the toggleMenu() controller method is not fired
Here is the snippet. When I tap the td, the ng-click-active is set (as shown below), but the $parent.toggleMenu() is not fired:
<td class="bigmacButton toggleMenu ng-click-active" ...
0
votes
4answers
25 views
AngularJS dynamic page title keeps loading curly brackets first
<title ng-show="pageName">{{ $root.pageName }} - Domain Name</title>
I'm trying to change the page title dynamically, when the page is loading the title preloads {{ $root.pageName }} - ...
-1
votes
0answers
32 views
Create Form using angularJs
I am new in angularJs & org. assigned me a form to create using angularJs
The form containing the two groups (Group A & Group B).
Each groups also containing two Sections which showing a ...
0
votes
1answer
29 views
scope not updating after loading csv file with d3
I have a node server that sends a csv file to the client when I hit the /scheduleE route. In my controller I hit this route and update the scope. I'd like the scope on the page to update.
...
0
votes
1answer
19 views
How should I handle function calls between controllers?
I'm trying to build an Angular app that consists of a fullscreen map and a sidebar.
I currently have a MapController that setups the map and then I have a PlacesController for listing places in the ...
3
votes
1answer
28 views
Bind ngModel to AngularJS directive with isolated scope
I'm trying to build an Angular directive that renders radio inputs and the associated labels. The HTML for the directive looks like this:
<d-radio name="gender" value="male" label="I'm a ...
0
votes
0answers
22 views
ngModel nested directive iterating a object tree
I want to parse a tree into nested directives
PROBLEM :
can't iterate inside with ng-repeat and call the same directive again . can't create a tree from model
can't get path from root object to ...
0
votes
1answer
15 views
AngularUI Bootstrap Datepicker Setting a minimum date
I am running the latest AngularUI Bootstrap and I have a Datepicker which gets enabled when it is clicked open by a button.
I've tried and searched to get the answer of how to disable dates being ...
0
votes
0answers
36 views
AngularJs: init directive model with parameter from Url
I have several instances of specific directive like that:
<type="text" my-directive ng-model="formData.property1">
<type="text" my-directive ng-model="formData.property2">
...
0
votes
1answer
53 views
Why won't my scope item bind to this promise?
I have a scope declaration....
$scope.item = animalStore.query();
The animal store is like this...
factories.factory('animalStore', [
'$resource','$q', function($resource,$q) {
var ...
0
votes
1answer
73 views
Create a list without ngRepeat
I would like to create a directive, that does not need ngRepeat, because there is some additional functionality on the directive, that doesn't play good with ngRrepeat.
This is my directive with ...
0
votes
2answers
22 views
Ionic: Preserve $scope when navigate to another view
I'm developing an app using Ionic Framework (Angular+Cordova).
The app have a News section with a list of news loaded from a server in JSON, then I tap in a new to open the Single New's View, but ...
0
votes
1answer
38 views
Using 'Done' instead of 'Success' in Angular promises
I've got an issue where I'm using the Contentful.js library to retrieve content in an Angular app. Instead of the normal $http.get with the success(data) callback, it uses a function with done(data). ...
1
vote
0answers
31 views
How to call a JSON file from Angularjs Module
I am new in AngularJS. I have a situation where I need to call and read a json file. Here is my Code
<!DOCTYPE html>
<html>
<head>
<script ...
0
votes
2answers
28 views
$scope undefined in angularjs
I'm creating an angular app for learning (I'm all new to angular) and currently stuck at this point,
Following is my angular controller
cookingPad.controller('RecipeCreateController', ...
0
votes
1answer
25 views
How to pass data into an angular.js UI bootstrap modal controller
Using Angular.js UI bootstrap modal, how can I pass data into a modal popup's controller? I am currently trying:
var modalInstance = $modal.open({
templateUrl: 'partials/confirmation-modal.html',
...
1
vote
1answer
27 views
Dynamically assign Angular model to input
I'm trying to create a mini-spreadsheet for an angular app. I want to recreate
a common spreadsheet feature that allows the user to click on a spreadsheet
cell and then change that cell's value using ...