with mysql pgsql intl support
$ brew install php --with-apache --with-mysql --with-pgsql --with-intl
date.timezone = Europe/Vienna
<?php | |
class BaseController extends Controller { | |
private $application_name = 'The Cool Kid'; | |
protected $layout = 'base'; | |
// The cool kids' way of handling page titles. | |
protected $title = array( | |
'parent' => '', | |
'seperator' => '::', |
<form name="registration"> | |
<div class="form-group"> | |
<label for="username">Username</label> | |
<input type="text" class="form-control" required ng-minlength="3" | |
id="username" name="username" ng-model="user.username"/> | |
<ng-messages for="registration.username.$error" | |
ng-show="registration.username.$dirty && registration.username.$invalid" role="alert"> | |
<ng-message when="required">Username is required</ng-message> | |
<ng-message when="minlength">Username must be at least 3 characters long</ng-message> | |
</ng-messages> |
form(name='registration') | |
.form-group | |
label(for='username') Username | |
input#username.form-control(type='text', required='', ng-minlength='3', | |
name='username', ng-model='user.username') | |
ng-messages(for='registration.username.$error', | |
ng-show='registration.username.$dirty && registration.username.$invalid', role='alert') | |
ng-message(when='required') Username is required | |
ng-message(when='minlength') Username must be at least 3 characters long |
include /angular_jade_form_mixins.jade | |
form(name='registration') | |
.form-group | |
+field-text('Username')(name='username', ng-model='user.username', ng-minlength='3', required='') | |
+field-errors('registration.username') | |
ng-message(when='required') Username is required | |
ng-message(when='minlength') Username must be at least 3 characters long |
mixin field-text(label) | |
label(for=attributes.id || attributes.name)= label | |
input.form-control(id=attributes.id || attributes.name, type='text')&attributes(attributes) | |
mixin field-errors(field) | |
ng-messages(for=field + '.$error', ng-show=field + '.$dirty && ' + field + '.$invalid', role='alert') | |
block |
<div ng-app="app"> | |
<form name="aForm" novalidate> | |
<label for="name">Your email</label> | |
<input type="email" id="name" ng-model="name" name="aField" required> | |
<ng-messages for="aForm.aField.$error"> | |
<ng-message when="required">This field is required</ng-message> | |
<ng-message when="email">Please enter proper email address</ng-message> | |
</ng-messages> | |
<button ng-click="save()">Send</button> | |
</form> |
<form name="aForm" novalidate> | |
<label for="name">Your email</label> | |
<input type="email" id="name" ng-model="name" name="aField" required> | |
<ng-messages for="aForm.aField.$error" | |
ng-show="aForm.aField.$invalid && aForm.aField.$dirty"> | |
<ng-message when="required">This field is required</ng-message> | |
<ng-message when="email">Please enter a valid email address</ng-message> | |
</ng-messages> | |
<button ng-click="save()" ng-disabled="aForm.$invalid">Send</button> | |
</form> |
angular.module('myApp.formUtils') | |
.directive('submitIfValid', function () { | |
return { | |
restrict: 'A', | |
require: '^form', | |
link: function (scope, element, attrs, form) { | |
element.on('click', handleClick); | |
function handleClick() { |
ng new my-fancy-app --skip-npm && yarn | |
# |