docs: add demo template block to api

This commit is contained in:
Drew Rygh
2015-12-03 11:32:33 -06:00
parent 0d5efe6658
commit b6c5ef8ca8
3 changed files with 22 additions and 1 deletions

View File

@ -15,6 +15,8 @@ import * as util from 'ionic/util';
* *
* Using the List and Item components make it easy to support various * Using the List and Item components make it easy to support various
* interaction modes such as swipe to edit, drag to reorder, and removing items. * interaction modes such as swipe to edit, drag to reorder, and removing items.
* @demo /docs/v2/demos/list/
*
* *
*/ */
@Directive({ @Directive({

View File

@ -114,7 +114,7 @@ module.exports = function(currentVersion){
}) })
.config(function(parseTagsProcessor) { .config(function(parseTagsProcessor) {
parseTagsProcessor.tagDefinitions.concat(require('./tag-defs/tag-defs')); parseTagsProcessor.tagDefinitions = parseTagsProcessor.tagDefinitions.concat(require('./tag-defs/tag-defs'));
}) })
// .config(function(parseTagsProcessor) { // .config(function(parseTagsProcessor) {

View File

@ -82,6 +82,25 @@ docType: "<$ doc.docType $>"
<a href='http://github.com/driftyco/ionic2/edit/master/<$ doc.fileInfo.relativePath $>#L<$ doc.location.start.line $>'> <a href='http://github.com/driftyco/ionic2/edit/master/<$ doc.fileInfo.relativePath $>#L<$ doc.location.start.line $>'>
Improve this doc Improve this doc
</a> </a>
<!-- TODO(drewrygh, perrygovier): render this block in the correct location, markup identical to component docs -->
<@- if doc.demo and false -@>
<aside id="platform-preview" class="platform-preview">
<div class="platform-toggle">
<a ng-class="{active: iosActive}"
ng-click="setPlatform('ios')">iOS</a>
<a ng-class="{active: androidActive}"
ng-click="setPlatform('android')">Android</a>
</div>
<div id="demo-device-ios" ng-class="previewPlatform">
<iframe id="demo-ios" src="<$ doc.demo $>" frameborder="0"></iframe>
</div>
<div id="demo-device-android" ng-class="previewPlatform">
<iframe id="demo-ios" src="<$ doc.demo $>" frameborder="0"></iframe>
</div>
</aside>
<@ endif @>
</div> </div>
<@ block content @> <@ block content @>