Skip to content

Instantly share code, notes, and snippets.

View ysyun's full-sized avatar

YoungSik Yun ysyun

View GitHub Profile
@ysyun
ysyun / rxjs_operators_by_example.md
Created February 28, 2017 07:17 — forked from btroncone/rxjs_operators_by_example.md
RxJS 5 Operators By Example
@ysyun
ysyun / app\app.component.ts
Created October 5, 2016 07:42
Angular 2 Custom Form Control example
import { Component } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms';
import { createCounterRangeValidator } from './counter-input.component';
@Component({
selector: 'my-app',
template: `
<h2>Inside Form</h2>
<div>
<label>Change min value:</label>
@ysyun
ysyun / README.md
Created October 5, 2016 06:21
Angular2 Dynamic Form Example

Angular Documentation Example

Dynamic Form

@ysyun
ysyun / app\app.component.ts
Created August 7, 2016 06:21
Angular2 and class inheritance problems
import {AfterContentChecked, Component, ContentChildren, Input, QueryList, forwardRef, provide} from 'angular2/core';
export class BaseComponent {
// Interesting stuff here
@Input() id: string;
}
@Component({
selector: 'child-comp2',
template: '<div>child component #2 ({{id}})</div>',
@ysyun
ysyun / api\users.json
Created July 21, 2016 13:50
Angular 2 - New Router rc.5 - lazyloading & all option
[{
"id": 34,
"username": "spiderman",
"roles": ["admin", "user"]
}, {
"id": 67,
"username": "batman",
"roles": ["user"]
}]
@ysyun
ysyun / api\users.json
Created July 21, 2016 13:50
Angular 2 - New Router rc.5 - lazyloading & all option
[{
"id": 34,
"username": "spiderman",
"roles": ["admin", "user"]
}, {
"id": 67,
"username": "batman",
"roles": ["user"]
}]
@ysyun
ysyun / app\about.component.ts
Last active July 28, 2016 08:10
New Router Configuration with Nested Child Router - https://coryrylan.com/blog/introduction-to-angular-2-routing
import { Component } from '@angular/core';
import { ActivatedRoute, ROUTER_DIRECTIVES } from '@angular/router';
@Component({
selector: 'about-home',
template: `<h3>About Home</h3>`
})
export class AboutHomeComponent { }
@Component({
@ysyun
ysyun / .babelrc
Created July 19, 2016 01:36
angular2 dynamic component loading using ComponentResolver
{
"stage": 1,
"modules": "system"
}
@ysyun
ysyun / index.html
Created July 4, 2016 09:07
Angular2 + Typescript + Jasmine Test with Child Component Override
<!DOCTYPE html>
<html>
<head>
<title>Angular2 Testing Playground - Jasmine</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jasmine/2.4.1/jasmine.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jasmine/2.4.1/jasmine.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jasmine/2.4.1/jasmine-html.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jasmine/2.4.1/boot.js"></script>
@ysyun
ysyun / README.md
Last active July 4, 2016 08:50
Angular2 + Typescript - Class, Property, Parameter, Method, Accessor Decorator

Angular2 Starter Plunker - Typescript - RC.0

A simple plunker demonstrating Angular2 usage:

  • Uses SystemJS + TypeScript to compile on the fly
  • Includes binding, directives, http, pipes, and DI usage.