This file contains 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
'use strict' | |
const User = use('App/Model/User') | |
class RegisterController { | |
* register (request, response) { | |
console.log('register api'); | |
const user = new User() |
This file contains 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
'use strict'; | |
angular | |
.module('schema-form-accordion') | |
.directive('sfAccordion', sfAccordion); | |
function sfAccordion($timeout) { | |
var ddo = { | |
restrict: 'A', | |
require: ['^ngModel', '^accordion', '^form'], |
This file contains 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
// in constructor iterate over FormWrapper instance this.props.children and decorate "*Field" with <Field> | |
decorateFields = (element) => { | |
const { props: { children } = {} } = element; | |
const { type: { name } = {} } = element; | |
if (typeof element === 'string' || typeof element.type === 'string') return element; | |
//Editable has prop component which is <InlineSelectField> that never gets decorated | |
This file contains 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
<Editable> | |
<p>My name is <TextField ... /> and I am <Dropdown options={['awesome', 'awesome', 'awesome'] />.</p> | |
</Editable> |
This file contains 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
'use strict'; | |
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
var Exemplar = function () { | |
function Exemplar() { | |
_classCallCheck(this, Exemplar); | |
} |
This file contains 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
var RadioGroupControl=exports.RadioGroupControl=function(props){ |
This file contains 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
<Accordion> | |
<PanelHeader>Your Risk Illustration</PanelHeader> | |
<PanelContent> | |
<Illustration id="risk" /> { /* Dynamically load widget from CDN. Different "house view" loads different widget */ } | |
</PanelContent> | |
</Accordion> |
This file contains 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
function LibraryCtrl($scope, LibraryService, artists) { //assumming you're favoring $scope over this | |
$scope.artists = artists || []; //defensive | |
$scope.albums = []; | |
$scope.selectedArtist = null; | |
activate(); //I like to put my activation logic in a function, and call it | |
function activate() { | |
$scope.selectedArtist = LibraryService.getSelectedArtist(); | |
This file contains 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
<QuestionGroup key="parent"> | |
<CollapsablePanelContainer> | |
<Panel> | |
<PanelHeaderLayout> | |
<PanelHeader /> | |
</PanelHeaderLayout> | |
<PanelContentLayout> | |
<Question key="child" /> // should render out as parent.child | |
</PanelContentLayout> | |
</Panel> |
NewerOlder