- Angular scope hierarchy issue
- [Directive isolated scope variable binding] (http://codepen.io/cyrilpanicker/pen/VvbXOe?editors=101)
- DOM traversal in Angular directive
- Custom validation using ui-validate directive
- Directive non-isolated scope variable binding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------ | |
-What are closures? | |
-How can you create a class in javascript? | |
-What is prototypal inheritance? | |
-i have a function which is already a method of a class. i want to use that function on an object of another class / what is apply/call function? | |
-apply/call/bind functions | |
-can we do multithreading in javascript as in other languages? | |
-why do you need promises in javascript? can we do the same thing with callbacks? why do we prefer promises over callback? | |
---------------- | |
(function() { |
A Pen by Cyril Panicker on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- use below as skeleton to create a .desktop file | |
- name of the file is irrelevant. | |
[Desktop Entry] | |
Name=Android Studio | |
Comment=Android IDE | |
Exec=/usr/local/bin/studio | |
Icon=/home/cyril/Softwares/android-studio/bin/studio.png | |
Terminal=false | |
Type=Application |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Promise=require('bluebird'); | |
var addOneAsync=function (number) { | |
return new Promise(function (resolve,reject) { | |
setTimeout(function() { | |
console.log('addOneAsync called'); | |
if (number<=0 || number >20) { | |
reject('number should be between 1 and 20'); | |
} else { | |
resolve(number+1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Test () { | |
var privateVariable=0; | |
this.publicVariable=0; | |
this.setPrivate=function (value) { | |
privateVariable=value; | |
}; | |
this.getPrivate=function () { |
A Pen by Cyril Panicker on CodePen.
A Pen by Cyril Panicker on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-app="app"> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form name="form" ng-controller="controller" novalidate ng-app="app"> | |
<input ng-model="data.value" name="number" integer /><br/> | |
{{data}}<br/> | |
{{form.number.$error}} | |
</form> |
NewerOlder