Skip to content

Instantly share code, notes, and snippets.

@wphax
wphax / app.component.ts
Last active June 26, 2017 04:15
Dynamic Component Loading in Angular 2 RC4
import { Component } from '@angular/core';
import { DynamicHTMLDirective } from './dynamic-html.directive';
@Component( {
selector: 'main-layer',
directives: [ DynamicHTMLDirective ],
template: '<dynamic-html-wrap [src]="data"></dynamic-html-wrap>'
} )
export class AppComponent {
public data: string = '<something></something>';
@wphax
wphax / EmptyWidget.php
Created March 14, 2012 04:05 — forked from jonathonbyrdziak/CustomWidgetFile.php
Plugin code to create a single widget in wordpress.
<?php
/**
* @package RedRokk
* @version 1.0.0
*
* Plugin Name: Empty Widget
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Empty_Widget keyword to rebrand this class for your needs.
* Author: RedRokk Interactive Media
* Version: 1.0.0
* Author URI: http://www.redrokk.com