Report
Question
I have all of my AngularJS controllers in one file, controllers.js. This file is structured as follows: angular.module('myApp.controllers', []) .controller('Ctrl1', ['$scope', '$http', function($scope, $http) { }]) .controller('Ctrl2', ['$scope', '$http', function($scope, $http) } ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
6 Answer 13 views

Report
Question
The below function works fine on Opera, Firefox and Chrome. However, in IE8 it fails on the if ( allowed.indexOf(ext[1]) == -1) part. Does anyone know why? Is there any obvious mistake? function CheckMe() { var allowed = new ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
7 Answer 5 views

Report
Question
Do any of you know how to nicely handle anchor hash linking in AngularJS? I have the following markup for a simple FAQ-page <a href="#faq-1">Question 1</a> <a href="#faq-2">Question 2</a> <a href="#faq-3">Question 3</a> <h3 id="faq-1">Question 1</h3> <h3 id="faq-2">Question 2</h3> <h3 id="fa1-3">Question 3</h3> When clicking on any of the above ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
26 Answer 0 views

Report
Question
I’m trying to create an element dynamically using an HTML string. Here’s a simple example using both prototype and DOM: // HTML string var s = '<li>text</li>'; // DOM var el1 = document.createElement(s); // prototype var el2 = new Element(s); $('mylist').appendChild(el1); $('mylist').appendChild(el2); Both approaches insert an empty listitem ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
17 Answer 0 views

Report
Question
If I have a reference to an object – var test = {}; that will potentially (but not immediately) have nested objects, something like – { level1:{level2:{level3:'level3'}} }; what is the best way to test for the existence of keys in the ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
30 Answer 1 views

Report
Question
I know document.write is considered bad practice; and I’m hoping to compile a list of reasons to submit to a 3rd party vendor as to why they shouldn’t use document.write in implementations of their analytics code. Please include ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
14 Answer 2 views

Report
Question
I removed the old grunt first,and I install the new grunt.But I got an error: D:wwwgrunt-testgrunt grunt-cli: The grunt command line interface. (v0.1.4) Fatal error: Unable to find local grunt. If you’re seeing this message, either a Gruntfile wasn’t found or...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
9 Answer 2 views

Report
Question
I have a string that looks like this: 0000000020C90037:TEMP:data And I need to grab everything after the first colon, so that I have TEMP:data. I don’t often work in Javascript, if it were PHP I would do this: $str = '0000000020C90037:TEMP:data'; $arr = explode(":", $str); $var ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
14 Answer 0 views