Skip to main content

All Questions

Tagged with
4501 votes
15 answers
856k views

"Thinking in AngularJS" if I have a jQuery background? [closed]

Suppose I'm familiar with developing client-side applications in jQuery, but now I'd like to start using AngularJS. Can you describe the paradigm shift that is necessary? Here are a few questions that ...
Mark Rajcok's user avatar
1053 votes
3 answers
157k views

What are the nuances of scope prototypal / prototypical inheritance in AngularJS?

The API Reference Scope page says: A scope can inherit from a parent scope. The Developer Guide Scope page says: A scope (prototypically) inherits properties from its parent scope. So, does a ...
Mark Rajcok's user avatar
289 votes
14 answers
771k views

How can I access the value of a promise?

I'm looking at this example from Angular's documentation for $q, but I think this probably applies to promises in general. The example below is copied verbatim from their documentation with their ...
temporary_user_name's user avatar
371 votes
11 answers
282k views

Share data between AngularJS controllers

I'm trying to share data across controllers. Use-case is a multi-step form, data entered in one input is later used in multiple display locations outside the original controller. Code below and in ...
johnkeese's user avatar
  • 4,058
2051 votes
14 answers
360k views

How does data binding work in AngularJS?

How does data binding work in the AngularJS framework? I haven't found technical details on their site. It's more or less clear how it works when data is propagated from view to model. But how does ...
Pashec's user avatar
  • 23.3k
836 votes
17 answers
703k views

Insert HTML into view from AngularJS controller

Is it possible to create an HTML fragment in an AngularJS controller and have this HTML shown in the view? This comes from a requirement to turn an inconsistent JSON blob into a nested list of id: ...
Swaff's user avatar
  • 13.6k
157 votes
10 answers
448k views

How to enable CORS in AngularJs

I have created a demo using JavaScript for Flickr photo search API. Now I am converting it to the AngularJs. I have searched on internet and found below configuration. Configuration: myApp.config(...
ankitr's user avatar
  • 6,182
908 votes
12 answers
623k views

Working with $scope.$emit and $scope.$on

How can I send my $scope object from one controller to another using .$emit and .$on methods? function firstCtrl($scope) { $scope.$emit('someEvent', [1,2,3]); } function secondCtrl($scope) { ...
Paul Kononenko's user avatar
251 votes
17 answers
360k views

Passing data between controllers in Angular JS?

I have a basic controller that displays my products, App.controller('ProductCtrl',function($scope,$productFactory){ $productFactory.get().success(function(data){ $scope.products = ...
kishanio's user avatar
  • 7,089
595 votes
14 answers
401k views

Can one AngularJS controller call another?

Is it possible to have one controller use another? For example: This HTML document simply prints a message delivered by the MessageCtrl controller in the messageCtrl.js file. <html xmlns:ng="...
BanksySan's user avatar
  • 28.6k
199 votes
11 answers
291k views

How do I POST urlencoded form data with $http without jQuery?

I am new to AngularJS, and for a start, I thought to develop a new application using only AngularJS. I am trying to make an AJAX call to the server side, using $http from my Angular App. For sending ...
Veer Shrivastav's user avatar
128 votes
14 answers
124k views

Controller not a function, got undefined, while defining controllers globally

I am writing a sample application using angularjs. i got an error mentioned below on chrome browser. Error is Error: [ng:areq] http://errors.angularjs.org/1.3.0-beta.17/ng/areq?p0=...
yokks's user avatar
  • 5,773
333 votes
16 answers
334k views

AngularJS: How can I pass variables between controllers?

I have two Angular controllers: function Ctrl1($scope) { $scope.prop1 = "First"; } function Ctrl2($scope) { $scope.prop2 = "Second"; $scope.both = Ctrl1.prop1 + $scope.prop2; //This is ...
dopatraman's user avatar
  • 13.9k
43 votes
5 answers
55k views

Delete firebase data older than 2 hours

I would like to delete data that is older than two hours. Currently, on the client-side, I loop through all the data and run a delete on the outdated data. When I do this, the db.on('value') function ...
carterw485's user avatar
225 votes
10 answers
190k views

AngularJS routing without the hash '#'

I'm learning AngularJS and there's one thing that really annoys me. I use $routeProvider to declare routing rules for my application: $routeProvider.when('/test', { controller: TestCtrl, ...
pikkvile's user avatar
  • 2,521

15 30 50 per page
1
2 3 4 5
583