Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!--views/searchdialog.html-->
<body class="ng-scope" ng-controller="SearchController as vm">
  <div class="ngdialog-message">
    <form novalidate>
      <h1>Test, eh?</h1>
      <formly-form model="vm.rental" fields="vm.rentalFields" form="vm.rentalForm">
        <button type="submit" class="btn btn-primary" ng-disabled="vm.rentalForm.$invalid">Submit</button>
      </formly-form>
    </form> 
  </div>
  <!-- Formly does not show up, normal forms does!-->
  
 
 
body {
  margin: 20px
}
.formly-field {
  margin-bottom: 16px;
}
 
/** MainCtrl.js calls SearchCtrl
angular.module('MainCtrl', []).controller('MainController', function($scope, $rootScope, ngDialog) {
  $scope.openPlain = function () {
    $rootScope.theme = 'ngdialog-theme-plain';
    ngDialog.open({
      //template: 'firstDialogId',
      template: 'views/searchdialog.html',
      controller: 'SearchController',
      className: 'ngdialog-theme-plain',
      closeByDocument: false
    });
  };
});
**/
// SearchCtrl.js
angular.module('SearchCtrl', []).controller('SearchController', function (ngDialog) {
  'use strict';
  var vm = this;
  // The model object that we reference on the  element in index.html
  vm.search = {};
  // An array of our form fields with configuration
  // and options set. We make reference to this in
  // the 'fields' attribute on the  element
  vm.searchFields = [
    {
      key: 'fco',
      type: 'input',
      templateOptions: {
        type: 'text',
        label: 'FCO',
        placeholder: 'FCO input',
        required: true
      }
    },
    {
      key: 'kst',
      type: 'input',
      templateOptions: {
        type: 'text',
        label: 'KST',
        placeholder: 'KST input',
        required: true
      }
    },
  ];
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers