612
votes
3answers
58k views

How do I “think in AngularJS” if I have a jQuery background?

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 ...
24
votes
1answer
6k views

How is Angular Js different from jquery

I only know one JS library and that is jquery. But my other coders in the group is changing Angular Js as their default library in new project. I know anything about it. How its different from ...
23
votes
1answer
22k views

from jquery $.ajax to angular $http

I have this piece of jQuery code that works fine cross origin: jQuery.ajax({ url: "http://example.appspot.com/rest/app", type: "POST", data: JSON.stringify({"foo":"bar"}), dataType: ...
16
votes
5answers
1k views

Masonry with AngularJS

I am developing an "art gallery" app. Feel free to pull down the source on github and play around with it. Plunker with full source. The current work around for getting Masonry to play nice with ...
14
votes
2answers
1k views

Difference Between Observers and Watchers

I know that both Watchers and Observers are computed as soon as something in $scope changes in AngularJS. But couldn't understand what exactly is the difference between the two. My initial ...
14
votes
2answers
7k views

AngularJS call method in directive controller from other controller

I am trying to figure this one out but it seems google is not my friend today so I'm going to ask you guys here. Basically I have a directive that has its own controller. See the below code: var ...
13
votes
5answers
14k views

AngularJS - Any way for $http.post to send request parameters instead of JSON?

I have some old code that is making an AJAX POST request through jQuery's post method and looks something like this: $.post("/foo/bar", requestData, function(responseData) { //do ...
13
votes
1answer
5k views

I am getting this error “No module: ngResource”

Trying to use the Angular $resource, and its coming back as not a method. Looking through the sparse documentation, I was able to find this : angular.module('productServices', ['ngResource']). That ...
12
votes
2answers
5k views

AngularJS: How can I run a directive after the dom has finished rendering?

I've got a seemingly simple problem with no apparent (by reading the Angular JS docs) solution. I have got an Angular JS directive that does some calculations based on other DOM elements' height to ...
11
votes
1answer
8k views

AngularJS + JQuery : How to get dynamic content working in angularjs

I am working on a Ajax app using both JQuery and AngularJS. When I update content (which contains angularjs bindings) of a div using jquery html function, the angularjs bindings doesn't work. Here ...
11
votes
1answer
6k views

How to call jQuery properly from an angular controller

I'm trying to use jQuery-UI tabs with angular and thus hooking them up in angular. See the example here Problem is that calling jQuery("#tabs").tabs(); in the controller seems to hook up "half" of ...
10
votes
1answer
10k views

Accessing clicked element in angularjs

I'm relatively new to AngularJS and suspect I'm not grasping a concept. I'm also using Twitter Bootstrap and I've got jQuery loaded. Workflow: User clicks a link from a list, "master" section is ...
9
votes
3answers
2k views

AngularJS directive to stopPropagation

I am trying to "stopPropagation" to prevent a Twitter Bootstrap navbar dropdown from closing when an element (link) inside an li is clicked. Using this method seems to be the common solution. In ...
9
votes
5answers
9k views

AngularJS: How to run additional code after AngularJS has rendered a template?

I have an Angular template in the DOM. When my controller gets new data from a service, it updates the model in the $scope, and re-renders the template. All good so far. The issue is that I need to ...
8
votes
3answers
5k views

AngularJS ng-repeat finish event

I want to call some jQuery function targeting div with table. That table is populated with ng-repeat. When I call it on $(document).ready() I have no result. Also ...

1 2 3 4 5 28
15 30 50 per page