Skip to main content

Questions tagged [javascript-framework]

A JavaScript framework is a library of pre-written JavaScript which allows for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies.

javascript-framework
Filter by
Sorted by
Tagged with
925 votes
45 answers
424k views

What is the difference between React Native and React?

I have started to learn React out of curiosity and wanted to know the difference between React and React Native - though could not find a satisfactory answer using Google. React and React Native seems ...
shiva kumar's user avatar
  • 11.4k
591 votes
7 answers
702k views

AngularJS passing data to $http.get request

I have a function which does a http POST request. The code is specified below. This works fine. $http({ url: user.update_path, method: "POST", data: {user_id: user.id, draft: true} }); I ...
Chubby Boy's user avatar
396 votes
4 answers
114k views

Difference between the 'controller', 'link' and 'compile' functions when defining a directive

Some places seem to use the controller function for directive logic and others use link. The tabs example on the angular homepage uses controller for one and link for another directive. What is the ...
user1558259's user avatar
  • 3,961
283 votes
20 answers
667k views

jQuery: Check if div with certain class name exists

Using jQuery I'm programmatically generating a bunch of div's like this: <div class="mydivclass" id="myid1">Some Text1</div> <div class="mydivclass" id="myid2">Some Text2</div>...
avatar's user avatar
  • 12.3k
269 votes
21 answers
376k views

Angular JS break ForEach

I have an angular foreach loop and i want to break from loop if i match a value. The following code does not work. angular.forEach([0,1,2], function(count){ if(count == 1){ break; } }); How ...
Chubby Boy's user avatar
202 votes
3 answers
163k views

AngularJs ReferenceError: $http is not defined

I have the following Angular function: $scope.updateStatus = function(user) { $http({ url: user.update_path, method: "POST", data: {user_id: user.id, draft: true} ...
Chubby Boy's user avatar
199 votes
20 answers
198k views

How to create a jQuery plugin with methods?

I'm trying to write a jQuery plugin that will provide additional functions/methods to the object that calls it. All the tutorials I read online (have been browsing for the past 2 hours) include, at ...
Yuval Karmi's user avatar
  • 26.5k
185 votes
5 answers
22k views

What are the real-world strengths and weaknesses of the many frameworks based on backbone.js? [closed]

Hope that someone can share their experience with some of the latest emerging backbone.js variants out there. I have some good experience with backbone/underscore/require in several projects and I ...
148 votes
7 answers
200k views

Get epoch for a specific date using Javascript

How do I convert 07/26/2010 to a UNIX timestamp using Javascript?
Asim Zaidi's user avatar
  • 27.9k
145 votes
13 answers
186k views

Error: 10 $digest() iterations reached. Aborting! with dynamic sortby predicate

I have the following code which repeats and displays the name of the user and his score: <div ng-controller="AngularCtrl" ng-app> <div ng-repeat="user in users | orderBy:predicate:reverse |...
Chubby Boy's user avatar
118 votes
8 answers
58k views

What is the need of JSF, when UI can be achieved with JavaScript libraries such as jQuery and AngularJS

I was reading about JSF that it's a UI framework and provides some UI components. But how is it better or different from number of components that are available from jQueryUI, AngularJS, React, Vue.js,...
sushil bharwani's user avatar
105 votes
4 answers
175k views

How to get an element by its href in jquery?

I want to get an element by its href attribute in jquery or javascript. Is that possible?
eos87's user avatar
  • 9,193
101 votes
3 answers
86k views

how to select all class except the clicked element in JQuery?

I have a website developed on Drupal. I use a module called collapsiblock (it is basicly a JQuery plugin) to achieve accordion like effect. It is working fine with me (although it is in Beta). But I ...
Hassan Al-Jeshi's user avatar
86 votes
1 answer
70k views

Ways to save Backbone.js model data?

I am more into front end development and have recently started exploring Backbone.js into my app. I want to persist the model data to the server. Could you please explain me the various way to save ...
copenndthagen's user avatar
86 votes
8 answers
20k views

Coffeescript --- How to create a self-initiating anonymous function?

How to write this in coffeescript? f = (function(){ // something })(); Thanks for any tips :)
user537339's user avatar
  • 1,831
81 votes
4 answers
50k views

Backbone.js and jQuery

It is said that Backbone handles all the higher level abstractions, while jQuery or similar libraries work with the DOM, normalize events and so on.. Could someone please help me understand this ...
copenndthagen's user avatar
73 votes
3 answers
43k views

Angular.js and ASP.NET MVC 4 [closed]

I have an ASP.NET MVC 4 project and I'm stuck on an architectural decision on which JavaScript framework or library to use Angular.js or Knock.js. I am currently leaning towards using Angular.js over ...
GamerDev's user avatar
  • 2,006
70 votes
3 answers
133k views

Pass variables to AngularJS controller, best practice?

I am brand new to AngularJS and like what I've seen so far, especially the model / view binding. I'd like to make use of that to construct a simple "add to basket" piece of functionality. This is my ...
Greg's user avatar
  • 31.3k
67 votes
4 answers
12k views

Accessibility and all these JavaScript frameworks

I've been investigating a few of the JavaScript frameworks such as Backbone.js and Batman.js for a while and whilst I really like them, I have one niggling thing that I keep coming back to. That issue ...
John Polling's user avatar
  • 2,282
65 votes
8 answers
24k views

Google AngularJS Framework - Worth the risk?

I have been asked to build a small web application for one of our clients and think it might be a good opportunity to try out a different framework for building web applications. Most of the ...
TGuimond's user avatar
  • 5,487
54 votes
2 answers
72k views

HTML5 UI Frameworks [closed]

I found lots of HTML5 UI frameworks over there, such as: Kendo Wijmo jqWidgets Zebra Sencha SproutCore YUI XUI Shield UI I'm kinda overwhelmed with again so much resources out there. Looked some of ...
jviotti's user avatar
  • 18.5k
50 votes
6 answers
38k views

How to set up JavaScript namespace and classes properly?

It seems there are so many ways to set up a JavaScript application so it is confusing as to which one is correct or best. Are there any difference to the below techniques or a better way of doing this?...
TruMan1's user avatar
  • 35.2k
48 votes
7 answers
131k views

How to generate UL Li list from string array using jquery?

I have string array like 'United States', 'Canada', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bangladesh', 'Belarus', 'Belgium'**, ... etc. I want ...
Abhishek B.'s user avatar
  • 5,172
46 votes
4 answers
19k views

What is the danger in including the same JavaScript library twice?

One of the webapps I'm working in is made up of many partial HTML files. If the partial requires a JavaScript library such as YUI, the YUI library is included in the partial. When the partials are ...
Eric the Red's user avatar
  • 5,434
42 votes
6 answers
44k views

Are there any knockoutjs page/routing frameworks?

Coming from asp.net MVC 3. In MVC4 they introduced WebAPI's. It would be nice to be able to do all view/routes code in javascript and just rely on MVC for API. Heck it's really cool that webapi's ...
maxfridbe's user avatar
  • 5,920
42 votes
3 answers
48k views

Which could be the best backbonejs tutorial for beginners [closed]

I am very interested in backbone.js. But when I am learning, there's a lot of confusion in creating the structure. Could anyone show me a simple tutorial with good examples? This will be very useful ...
raj's user avatar
  • 543
41 votes
5 answers
45k views

Output jasmine test results to the console

I am using Jasmine (BDD Testing Framework for JavaScript) in my firefox add-on to test the functionality of my code. The problem is that jasmine is outputing the test results to an HTML file,what I ...
Yosi's user avatar
  • 2,946
38 votes
4 answers
21k views

Good jQuery Mobile walkthrough or tutorial for a jquery developer? [closed]

jQuery Mobile 1.0 final is out Important: Many of the tutorials are old and should not be followed. The current version of jQuery Mobile is 1.0! Please be careful while looking through the links I ...
naugtur's user avatar
  • 16.9k
37 votes
5 answers
17k views

Backbone model.destroy() invoking error callback function even when it works fine?

I have a Backbone.js model that I'm trying to destroy when the user clicks a link in the model's view. The view is something like this (pseudocode because it's implemented in CoffeeScript which can be ...
David Tuite's user avatar
  • 22.5k
36 votes
2 answers
3k views

Don't the data attribute options used in Bootstrap, Angular.js, and Ember.js conflict with Unobtrusive Javascript principles? [closed]

I've always been told it's good practice (ala 'unobtrusive javascript') separate JavaScript from HTML markup. However, I've been seeing the opposite trend with a number of new and popular frameworks ...
sdellis's user avatar
  • 531
34 votes
4 answers
19k views

Telerik KendoUI vs Sencha ExtJS? [closed]

We are going to build a enterprise grade application on Web and for that we have filtered down our choices to ExtJS and KendoUI. Both are decent and have rich features / controls, KendoUI is faster ...
deej's user avatar
  • 2,564
30 votes
3 answers
55k views

Angular JS Verify CSRF Token in POST Request

I am using AngularJS with Rails. I have the following request which updates users in bulk. $http{ method: 'POST', url: $scope.update_url, params: {selected_ids: userIds} } This cannot ...
Chubby Boy's user avatar
30 votes
12 answers
45k views

Suggestions for a JavaScript form builder? [closed]

I'm looking to integrate a form builder into a site I'm using, but I'm hoping to find a library that has some or most of the functionality I'm looking for. I'm looking for a library that will give me ...
Jack M.'s user avatar
  • 31.5k
30 votes
2 answers
29k views

Frontend javascript frameworks with node.js [closed]

I am starting to learn frontend JavaScript frameworks like Backbone.js or Embers.js and I wanted to do some projects in Node.js. I have been reading some documentation and it seems these frameworks ...
Juanillo's user avatar
  • 875
30 votes
2 answers
14k views

Why Does Bootstrap Require jQuery? [closed]

I have googled this question numerous times and never found a satisfactory answer. Most answers seem only to say that "yes, Bootstrap plugins do require jQuery" or "yes, you can use BS ...
Rabadash8820's user avatar
  • 2,416
28 votes
5 answers
40k views

PMT function in Javascript

I want to use Excel PMT function in Javascript. The parameter would be Pmt( interest_rate, number_payments, PV, FV, Type ) interest_rate : the interest rate for the loan. number_payments : the ...
dps123's user avatar
  • 1,073
26 votes
3 answers
40k views

Real Time data graph [closed]

I would like to build a web-based real time data graph and i'm looking at the different options such as: Html5 canvas JS libraries with graph support such as Extjs By real time i mean, either the ...
ken's user avatar
  • 3,745
24 votes
7 answers
10k views

Django and Mustache use the same syntax for template

I try to smuggle HTML template in the HTML for mustache.js, however the django template engine remove all the placeholders that should be output as-is to the front-end The template is included in ...
DB Tsai's user avatar
  • 1,398
24 votes
6 answers
22k views

What are your tips for best practice for web application structure? [closed]

I do a lot of custom applications at work. I'm trying to define some standards for new applications. Something a little like Elements. CSS: How do you organize the style sheets? Should I have one ...
user avatar
24 votes
2 answers
8k views

Good implementation of scalable JavaScript application architecture (Sandbox by Nicholas Zakas)? [closed]

I recently watched a good video with regards to a modular JavaScript architecture including a sandbox. I was wondering if there is anything that's been implemented in the wild? Is the framework ...
Martin's user avatar
  • 24.1k
23 votes
4 answers
9k views

Client-side Javascript app - url routing with no hash tag

I'm working on a new client-side only app with the latest version of Ember.js. There is a single PHP page which builds the scripts, css, template files, etc. and delivers it all into index.php. I'm ...
Jarrod Nettles's user avatar
22 votes
6 answers
39k views

Is there anyway to detect OS language using javascript?

I need to detect OS language using javascript so I can view my page depending on the language. I know that we can detect the browser language but that is not enough for me. I need Operation System ...
Saleh's user avatar
  • 2,689
21 votes
4 answers
40k views

using setInterval in angularjs factory

I was trying the code given in angularjs docs (given here: http://jsfiddle.net/zGqB8/) It just implements a time factory and uses $timeout to update the time object after each second. angular.module('...
user183123's user avatar
20 votes
3 answers
25k views

Angular JS observe on directive attribute

How can angular js watch attributes on custom directive in order to accept angular values to be bind Here is what I have so far: <tile title="Sleep Duration" data-value="{{sleepHistory....
Horace Heaven's user avatar
20 votes
9 answers
10k views

Which JavaScript Library Has the Most Comprehensive Class Inheritance Support? [closed]

After playing with a dozen different JavaScript Libraries such as Prototype, jQuery, YUI, just to name a few, I found every different library has a different way of simulating some sort of Class ...
Aaron Qian's user avatar
  • 4,477
20 votes
5 answers
10k views

jQueryMobile on Zepto.js?

I'm wondering if someone has tried already to port jQueryMobile on top of Zepto.js (http://zeptojs.com/) instead of the required jQuery?
Samber Valley's user avatar
20 votes
1 answer
5k views

Using DS.model or Ember.model or Ember.Object when defining a model?

This screencast : http://www.embercasts.com/episodes/getting-started-with-ember-model used Ember.model to create a person model like this: App.Person = Ember.Model.extend({ name : Ember.attr() }) ...
Jatin's user avatar
  • 14.2k
17 votes
2 answers
22k views

Angular JS views not updating properly

I have the following action ng-click in my view -> which inturn calls a jQuery ajax function that displays jQuery Qtip -> In the Qtip popup I have an ng-click on an element -> which performs a $http ...
Chubby Boy's user avatar
17 votes
5 answers
22k views

AngularJS filter only on certain objects

I have the user object defined as below. $scope.user = [{id: 1, friends: [ {name: 'John', age: 21, sex: 'M'}, {name: 'Brad', age: 32, sex: 'M'} ] }] I have the following code:...
Chubby Boy's user avatar
17 votes
4 answers
10k views

Computed properties in Backbone

I have a scenario where the data being manipulated on the client is presented and interacted with in a different way than it is represented on the server. Consider the following event resource ...
bloudermilk's user avatar

1
2 3 4 5
21