The tag has no usage guidance.

learn more… | top users | synonyms

-1
votes
0answers
20 views

How to find my Angular bugs? [duplicate]

I am using the framework Angular.js. My problem is, that it is hard to find a bug in my own code. Always when I do something wrong (no matter how small the problem is) the whole code doesnt work ...
0
votes
2answers
40 views

Storing results of Angular Resource in Factory

I'm currently using Angular $resource to make an api, and I would like to keep those results in a service rather than a controller because every time I call the controller the results get called ...
1
vote
2answers
42 views

How to pass data to controller and back to the view in Angular?

I have the following function that adds a comma every 3 characters as you type, so for example 1000 with return 1,000 http://plnkr.co/edit/TL8hlIxyPbwUNCbLiKgs?p=preview But the function is specific ...
3
votes
3answers
42 views

What is the simplest way to load a controller when i change the view?

I'd like to load a controller when I change from one view to another. For example, I'm in the home page and user wants to go to the log in page. I have a LoginController in a file that is not include ...
4
votes
1answer
80 views

AngularJS $scope is not updating in DOM

I have the following codes : The state (lets just make it short for simplicity purposes) .state('foo', { url: '/foo', templateUrl: 'path/to/template.html', controller:'fooCtrl', }) ...
0
votes
1answer
27 views

Angular scope not updating after service call

I have a controller and service. The service performs a http.get and return true if successful and false if error. However, in the controller, it receives true or false correctly, but the html of ...
0
votes
2answers
49 views

Angular JS pass parameter one controller to another

I have two controllers in my app TimelineController and ReservationModalController. I want to call TimelineController from ReservationModalController and pass variable value. I'm trying to that: this ...
10
votes
1answer
153 views

Angularjs change view template after link clicked

I am trying to change html template after link is clicked. Value is boolean, initial value is true and appropriate template is loaded, but when value changed to false new template is not loaded, I ...
-1
votes
2answers
49 views

Angular ngModel different view and value

Does ngModel controller in directive have any option to show something different from ngModel value in view, or i have to write custom html directive for input? I wrote a comma-separator directive. ...
1
vote
3answers
42 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
45 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
2answers
44 views

Angular, how to assign controller to markup before ng-repeat

Can anyone tell me if is possible to assign a controller from a directive to the markup before ng-repeat does his thing? The code below is just an example of what i want to do <body ...
2
votes
2answers
24 views

AngularError - app.controller(…) is not a function

I would like to understand why this code works but when it runs, I get a message: app.controller(...) is not a function and how can I fix it? <script> var app = ...
0
votes
2answers
23 views

Function return different response using $q.defer in controller and resolve

I have created a state using state provider and i used resolve, i called api using factory. .state('Test', { url: '/Test/:testId', templateUrl: TEMPLATE_URL + 'Test/test.html', ...
0
votes
1answer
33 views

AngularJs - Injecting child module into other child module

I have a scenario which might sound stupid but I'm stuck and trying to understanding what might be causing it to not work. I have an angular app which has three modules for now var app = ...
1
vote
2answers
47 views

Why does AngularJS directive work with hardcoded values but fail with http request/response?

Angular Newbie Question: I have a simple AngularJS test application that shows how a controller and a directive work together. The controller sets some hardcoded values aB and aC on the scope and the ...
1
vote
1answer
23 views

Angular JS prevent controller from running on hidden element

I have this codes .state('fooState', { url: '/foo', templateUrl: 'path/to/bar.html', controller:'parentController' }) // THIS IS THE bar.html <div class="sample"> <div ...
4
votes
2answers
56 views

AngularJS: how to assign service method to controller $scope and ng-repeat (it) in view?

I'm trying to separate functionality from controller and put it in service so I can use it in multiple controllers without adding same piece of functionality across different controllers. My original ...
-1
votes
3answers
36 views

how to pass values from callback function from service to controllers

How can I access values returned from service using controller. In my code service.js function showInfo() returns JSON objects. But I cannot access these objects outside this function. If I try to do ...
1
vote
1answer
25 views

Service injection into controller having in seperate files with AngularJS

When i try to inject service into controller which I have in separate file mentioned in below code i get error: TypeError: myService.getData is not a function at new (controllers.js:18) ...
-1
votes
1answer
28 views

What's the proper way to hit/consume APIs on AWS using Angular?

I'm jumping aboard a new project, and building out an entirely new frontend in Angular. The existing project has RESTful APIs (on AWS) that the frontend application will be hitting. In previous hobby ...
0
votes
2answers
65 views

how to pass values from service to controller in Angularjs

I am making a widget using angular dashboard framework but I am stuck at how to pass data values generated in services to controller? I would like to pass values of var new_x to controller- in ...
0
votes
2answers
32 views

Accessing directive from a different module

I have two different modules , first one contains controller second directive. Basically i want the directive to be rendered in my view. But as modules for directiveandcontroller are different, its ...
0
votes
1answer
30 views

Assigning separate controller files in Angular's UI Router

I am new to Angular and Angular's UI Router. I have a basic index.html file in which I inject the views. And then I have app.js with the routes inside, a template client.html and a controller about ...
0
votes
0answers
25 views

Filter/Group by Data in angular

we have data returned from rest service in below JSON format and I want to group data by ActivityStartDate and then show in format. I can iterate through and create group by ActivityStartDate but this ...
0
votes
0answers
88 views

Angularjs How submit a form after upload image

I'm trying to submit a form from my controller when I upload the image. I'm not sure how I can do that. Any help will be appreciated! (function(angular) { 'use strict'; ...
1
vote
1answer
35 views

Execute code within a factory when needed, not when loaded into controller

Factory: .factory("myFac", ['$http', '$q', function($http, $q) { var defer = $q.defer(); $http.get('some/sample/url').then(function (response) { //success /* * Do ...
3
votes
1answer
65 views

AngularJS how to use ng-model inside a custom directive tag, setting the controller dinamically?

I started in Angular recently, so I have some questions. My problem: I created a directive that I will use in many 'pages' with different controllers in each situation, for example. Now I can set ...
0
votes
1answer
53 views

How to Add Controller In Angular Directive Class In Typescript

Following is my angular directive class in typescript I have written so far: My question is how I can add controller for this directive. I don't want to create new controller class and bind that ...
0
votes
1answer
41 views

Angular JS - $watch changes made in directive from controller

I'm trying to $watch changes that happen in directive scope and add objects to an array if they have been changed. The edit functionality is in the directive scope but the save functionality is ...
0
votes
2answers
34 views

How can I load my controllers at application Bootstrap

I need to initialize the controller, that I use in another view from my start view.For this purpose I want to call my defined setup() method from that controller. I can't do that because it is ...
0
votes
0answers
22 views

how to call one countroller and refresh tab result in another controller on change status using angular.js?

i am newer in angular. I have a two tab in which result has been show. now i have two controller for each tab one controller is : app.controller('MessageFetchGrid', function ($scope, $http, ...
0
votes
1answer
38 views

JS function defined in AngularJS controller not working

The following is my controller code: app.controller('HomeController', ['$scope', '$location', '$sce', '$routeParams', '$timeout', function($scope, $location, $sce, $routeParams, $timeout ) { // ...
3
votes
1answer
73 views

Trouble with Angular Nested Directives when using ControllerAs

I am building a huge form that calls various directives to build a complete form. The Main Page calling the Form Builder passes the ng-model data like this: <div form-builder ...
0
votes
1answer
83 views

AngularJS: Best practices for routes and controllers

on our company, we're currently working on a single page web application. Users can login and fill their profiles with data and share those with other subscribers (it's a social network-ish ...
1
vote
2answers
52 views

Calliing factory function in controllers of angular

I am getting rest api call from angular service and I need to get the response data in any variable of angular controller.So yhat I can use that in view file. Here is my code: my angular service.js: ...
0
votes
1answer
18 views

angular $controller locals substitue

I am using $controller service to inherit controller. I have something like this angular.module('myModule', ['someModule']) .controller('parentController', parentController) ...
0
votes
4answers
26 views

Need Help on dependency injection for controller in angularjs [duplicate]

HI I've seen 2 ways of dependency injection in angularjs controller Method1: mainApp.controller('CalcController', function($scope, CalcService, defaultInput) {}); Method2: ...
3
votes
2answers
61 views

Error: [ng:areq] Argument 'GreetingController' is not a function, got undefined

I am trying to make angular work with Django. With very difficulty I made it work with Django and Angular, but now I am getting one more error. Everytime I load it, I get following error. Error: ...
1
vote
1answer
31 views

I can't inject service and constant in same controller?

I have a controller and I want to include a constant named myConstant from another file, and a service named myService: app.controller('myController', ["$scope", "v3_0_0", function($scope, ...
-2
votes
2answers
20 views

json data in loop of angular view

How to call this json data in loop of angular view(ng-repeat)... Here is my json { "customers": [ { "id": 1, "firstName": "LoadTestName1", ...
2
votes
2answers
58 views

How to hide a div from angular controller

I have a div in my html like <div class="row" ng-show="loginCtrl.showTouchID" > <div class="col-xs-12"> <button type="button" class="col-xs-12 btn ...
1
vote
2answers
92 views

Passing object between controllers in Angularjs

I'm new to angular and am struggling to get to understand how to use a Service to pass data from one controller to another. So far with with Angular, I have been able to understand how to call ...
0
votes
2answers
37 views

Angular can not find my factory

So I created with angular a small factory to get my local json file now I wanna pass that data to my controller but it can't find the factory name and says 'unresolved variable'. Here is the snippet ...
0
votes
1answer
39 views

nested ng-controller fires $locationChangeStart?

I have some parent Ctrl which has locationChangeStart function implememted. Also I have Child controller which binds data from html to parent controller html: <div> <!-- parent ctrl setted ...
0
votes
0answers
13 views

Angular: Richer UI Controllers & App-Framework APIs vs Lighter Controllers + Resovles

preface I've come to a crossroads in our fairly huge application. Over the course of 1.5 years the application has evolved a fairly functional and scalable app-framework. However it has presented a ...
0
votes
1answer
55 views

Displaying data from a json file in Angular

This questions has been answered on a different post. See here: Displaying json data in an Angular App
0
votes
1answer
43 views

Angular Routes not working, can you spot the bug?

I am trying to route 2 partials to my index page, but so far only one route seem to work, the other is unresponsive. I have gone through the codes so many times, but can't seem to spot the issue. ...
0
votes
5answers
99 views

AngularJS - On click not reaching controller method

I am learning Angularjs and Nodejs by developing a project. I have followed this tutorial and organised my folder structure and route configurations. Problem: I have added a method called ...
0
votes
1answer
47 views

angularJS parent scope not updating from directive

So here is my issue, I can't get my $scope.documents to update from my directive.$scope.parentUpdate({ documents: $scope.docType}) does not seem to execute at all an so my documents never updates. ...