A Pen by Captain Anonymous on CodePen.
This file contains 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
Show hidden characters
{ | |
"extends": [ | |
"tslint:latest", | |
"tslint-config-prettier" | |
], | |
"rules": { | |
"no-any": false, | |
"ordered-imports": false, | |
"semicolon": [true, "always"], | |
"member-ordering": [ |
This file contains 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
language: node_js | |
node_js: | |
- 'node' # use latest stable nodejs version | |
before_script: | |
- npm install | |
- npm run test | |
- npm run coverage | |
script: | |
- npm run build # jest test with coverage flag does coverage too | |
after_script: |
This file contains 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
class MyController { | |
constructor($scope, $rootScope) { | |
/* | |
Every $rootScope.$on returns a deregistration function that remove listerner and avoid duplications | |
https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$on | |
*/ | |
const deregisterDropdownOpenEvent = $rootScope.$on('DropdownOpened', () => console.log('dispatch event')) | |
/* Deregister function on scope $destroy event (when user leave the page, for example) */ | |
$scope.$on('$destroy', () => deregisterDropdownOpenEvent()) |
This file contains 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(angular){ | |
angular.module('blip.components', []) | |
.component('component1', { | |
template: '<span>{{ $ctrl.name }}</span>', | |
bindings: { | |
name: '@', | |
} | |
}) | |
.component('component2', { | |
template: '<span>{{ $ctrl.name }} 2</span>', |
This file contains 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
{ | |
"Create angular es7 module": { | |
"prefix": "ng-module", | |
"body": [ | |
"import * as angular from 'angular';", | |
"", | |
"// Types", | |
"", | |
"// Controllers", | |
"", |
This file contains 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
{ | |
"rules": { | |
"class-name": true, | |
"comment-format": [ | |
true | |
], | |
"curly": true, | |
"eofline": true, | |
"forin": true, | |
"indent": [ |
This file contains 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
@placeholder-ruleset: { text-transform: uppercase; }; | |
.placeholder(@color-01, @placeholder-ruleset); | |
/**/ | |
.placeholder(@color, @ruleset: {}) { | |
::-webkit-input-placeholder { | |
color: @color; | |
@ruleset(); | |
} |
This file contains 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
import java.util.Scanner; | |
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
/** | |
* | |
* @author Samuel Martins |