Difference between MEAN.js and MEAN.io

They’re essentially the same… They both use swig for templating, they both use karma and mocha for tests, passport integration, nodemon, etc. Why so similar? Mean.js is a fork of Mean.io and both initiatives were started by the same guy… Mean.io is now under the umbrella of the company Linnovate and looks like the guy … Read more

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

I’m going to expand your question a bit and also include the compile function. compile function – use for template DOM manipulation (i.e., manipulation of tElement = template element), hence manipulations that apply to all DOM clones of the template associated with the directive. (If you also need a link function (or pre and post … Read more

How to create a file in memory for user to download, but not through server?

Simple solution for HTML5 ready browsers… function download(filename, text) { var element = document.createElement(‘a’); element.setAttribute(‘href’, ‘data:text/plain;charset=utf-8,’ + encodeURIComponent(text)); element.setAttribute(‘download’, filename); element.style.display = ‘none’; document.body.appendChild(element); element.click(); document.body.removeChild(element); } form * { display: block; margin: 10px; } <form onsubmit=”download(this[‘name’].value, this[‘text’].value)”> <input type=”text” name=”name” value=”test.txt”> <textarea name=”text”></textarea> <input type=”submit” value=”Download”> </form> Usage download(‘test.txt’, ‘Hello world!’);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)