npm i -g angular-cli-ghpages
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
| path: string = "assets/images/"; | |
| let noimage = `${ path }no_avatar.svg`; | |
| // Devuelve -> "assets/images/no_avatar.svg" |
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
| import { Pipe, PipeTransform } from '@angular/core'; | |
| import moment from 'moment'; | |
| @Pipe({ | |
| name: 'moment' | |
| }) | |
| export class MomentPipe implements PipeTransform { | |
| transform(value: moment.Moment, format: string) { | |
| if (!moment.isMoment(value)) |
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
| question.title = `Hello ${this.name}, how old are you?`; |
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
| <ion-list radio-group (ionChange)="userSelected($event)"> | |
| <user *ngFor="let user of users" | |
| [data]="user"></user> | |
| </ion-list> | |
| // Dentro de un grupo de radio buttons, al seleccionar alguno de los elementos |
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
| npm install angularfire2@next -- save |
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
| const http = require('http'); | |
| const hostname = '127.0.0.1'; | |
| const port = 3000; | |
| const server = http.createServer(function(req, res) { | |
| res.statusCode = 200; | |
| res.setHeader('Content-Type', 'text/plain'); | |
| res.end('Hello World\n'); | |
| }); |
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
| [ngValue]="item.value ? item.value : item" |
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 class="container"> | |
| <button md-raised-button color="primary" (click)="fileInput.click()">Upload</button> | |
| <input hidden type="file" #fileInput> | |
| </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
| [ | |
| // duplicar línea abajo | |
| { | |
| "key": "shift+ctrl+d", | |
| "command": "editor.action.copyLinesDownAction", | |
| "when": "editorTextFocus" | |
| } | |
| ] |