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
https://codepen.io/zenius/pen/qGgobQ |
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
https://code.visualstudio.com/docs/setup/linux | |
The repository and key can be installed manually with the following script: | |
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg | |
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/ | |
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list' | |
Then update the package cache and install the package using: | |
sudo apt-get install apt-transport-https | |
sudo apt-get update |
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
https://github.com/chrisyip/koa-pug#basedir | |
basedir | |
If you encounter this error, Error: the "basedir" option is required to use "extends" with "absolute" paths, try to set basedir like this: | |
const pug = new Pug({ | |
viewPath: 'path/to/views', | |
basedir: 'path/for/pug/extends' | |
}) |
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
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/ |
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
Isolating scope is recommend for passing data between custom directive and its parent scope to prevent unintentionally changing the parent scope. | |
https://medium.com/@tpstar/angularjs-custom-directive-and-isolated-scope-how-to-pass-data-to-and-from-directive-scope-dd0bc8096bf9 |
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
https://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf |
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
https://www.tutlane.com/tutorial/angularjs/angularjs-apply-function | |
$scope.$apply(function () { | |
//Your Code. | |
}); | |
Different ways to use '$apply()' | |
1. | |
$scope.$apply(function () { | |
$scope.val1 = 'tutlane.com'; |
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
https://docs.angularjs.org/api/ng/service/$compile | |
// compile the new DOM and link it to the current | |
// scope. | |
// NOTE: we only compile .childNodes so that | |
// we don't get into infinite loop compiling ourselves | |
$compile(element.contents())(scope); |
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
https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage | |
// Save data to sessionStorage | |
sessionStorage.setItem('key', 'value'); | |
// Get saved data from sessionStorage | |
let data = sessionStorage.getItem('key'); | |
// Remove saved data from sessionStorage | |
sessionStorage.removeItem('key'); |
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="myForm"> | |
<label> | |
User name: | |
<input type="text" name="userName" ng-model="user.name" required> | |
</label> | |
<span class="error" ng-show="myForm.userName.$error.required"> Required!</span> | |
<label> | |
Last name: | |
<input type="text" name="lastName" ng-model="user.last" ng-minlength="3" ng-maxlength="10"> | |
</label> |