chore(plunker): open in embedded-style by default (#2884)
Added "flat-style" attribute option if you prefer to force a plunker into the original, flat editor style
This commit is contained in:
parent
fd9a331127
commit
cff978aee6
|
@ -10,7 +10,7 @@
|
|||
* [plnkr='...']
|
||||
* [noSource]
|
||||
* [embedded]
|
||||
* [embedded-style]
|
||||
* [embedded-style | flat-style]
|
||||
* [srcText="..."]
|
||||
* [title="..."]>text</live-example>
|
||||
* Example:
|
||||
|
@ -38,6 +38,10 @@
|
|||
* <live-example embedded-style>this example</live-example>
|
||||
* // ~/resources/live-examples/{page}//ts/eplnkr.html
|
||||
*
|
||||
* // Links to a *new* tab in the flat (original editor) style plunker editor
|
||||
* <live-example flat-style>this example</live-example>
|
||||
* // ~/resources/live-examples/{page}//ts/eplnkr.html
|
||||
*
|
||||
* // Displays in *same* tab as an embedded style plunker editor
|
||||
* <live-example name="toh-1" embedded plnkr="minimal" img="toh>Tour of Heroes - Part 1</live-example>
|
||||
* // ~/resources/live-examples/toh-1/ts/minimal.eplnkr.html
|
||||
|
@ -68,8 +72,9 @@ angularIO.directive('liveExample', ['$location', function ($location) {
|
|||
if (attrs['title'] == undefined) { tElement[0].setAttribute('title', text); } // set default title (tooltip)
|
||||
var ex = attrs.name || NgIoUtil.getExampleName($location);
|
||||
var embedded = attrs.hasOwnProperty('embedded');
|
||||
var flatStyle = attrs.hasOwnProperty('flatstyle') || attrs.hasOwnProperty('flatStyle');
|
||||
var embeddedStyle = embedded || attrs.hasOwnProperty('embeddedstyle') || attrs.hasOwnProperty('embeddedStyle');
|
||||
var plnkr = embeddedStyle ? 'eplnkr' : 'plnkr';
|
||||
var plnkr = (embeddedStyle || !flatStyle) ? 'eplnkr' : 'plnkr';
|
||||
var imageBase = '/resources/images/';
|
||||
var defaultImg = 'plunker/placeholder.png';
|
||||
|
||||
|
|
Loading…
Reference in New Issue