Skip to content

Instantly share code, notes, and snippets.

View migg24's full-sized avatar

Michael Dreher migg24

  • Unique AG
  • Germany
View GitHub Profile
anonymous
anonymous / promise.js
Created December 20, 2015 01:07
var guid = 0;
function getGuid() {
guid += 1;
var id = guid;
console.log('Generated guid', id);
return new Promise(resolve => {
setTimeout(() => {
resolve(id);
@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active November 29, 2023 15:35
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>