Basic create form
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -6,9 +6,10 @@ lunchApp = angular.module 'lunchApp', [
|
|||||||
lunchApp.config ['$routeProvider',
|
lunchApp.config ['$routeProvider',
|
||||||
($routeProvider) ->
|
($routeProvider) ->
|
||||||
$routeProvider
|
$routeProvider
|
||||||
|
.when '/',
|
||||||
|
templateUrl: 'templates/home.html',
|
||||||
|
controller: 'HomeCtrl'
|
||||||
.when '/runs',
|
.when '/runs',
|
||||||
templateUrl: 'templates/runs.html',
|
templateUrl: 'templates/runs.html',
|
||||||
controller: 'RunsCtrl'
|
controller: 'RunsCtrl'
|
||||||
.otherwise
|
|
||||||
redirectTo: '/runs'
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
lunchControllers = angular.module 'lunchControllers', []
|
lunchControllers = angular.module 'lunchControllers', []
|
||||||
|
|
||||||
|
lunchControllers.controller 'HomeCtrl', ['$scope', ($scope) ->
|
||||||
|
]
|
||||||
|
|
||||||
|
lunchControllers.controller 'CreateRunCtrl', ['$scope', '$http', ($scope, $http) ->
|
||||||
|
$scope.msg = 'im home, yah'
|
||||||
|
|
||||||
|
$scope.create = (run) ->
|
||||||
|
]
|
||||||
|
|
||||||
lunchControllers.controller 'RunsCtrl', ['$scope', '$http', ($scope, $http) ->
|
lunchControllers.controller 'RunsCtrl', ['$scope', '$http', ($scope, $http) ->
|
||||||
$scope.helloMsg = 'hello there boys and girls!'
|
$scope.helloMsg = 'hello there boys and girls!'
|
||||||
]
|
]
|
||||||
|
|||||||
9111
assets/linker/js/vendor/jquery-2.1.0.js
vendored
Normal file
9111
assets/linker/js/vendor/jquery-2.1.0.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
assets/templates/.home.jade.swp
Normal file
BIN
assets/templates/.home.jade.swp
Normal file
Binary file not shown.
22
assets/templates/home.jade
Normal file
22
assets/templates/home.jade
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
.row
|
||||||
|
.col-xs-12.col-sm-12.col-md-12.col-lg-12
|
||||||
|
div(ng-controller='CreateRunCtrl')
|
||||||
|
h2 Create a new run
|
||||||
|
form(name='form',novalidate,role='form')
|
||||||
|
div.form-group
|
||||||
|
label(for='creatorName') Your name
|
||||||
|
input#creatorName.form-control(type='text',ng-model='run.creatorName',required)
|
||||||
|
div.form-group
|
||||||
|
label(for='creatorEmail') Your email
|
||||||
|
input#creatorEmail.form-control(type='email',ng-model='run.creatorEmail',required)
|
||||||
|
div.form-group
|
||||||
|
label(for='groupEmails') Group emails
|
||||||
|
textarea#groupEmails.form-control(ng-model='run.groupEmails',required)
|
||||||
|
div.form-group
|
||||||
|
label(for='restaurant') Restaurant
|
||||||
|
input#restaurant.form-control(type='text',ng-model='run.restaurant')
|
||||||
|
div.form-group
|
||||||
|
label(for='menuUrl') Menu URL
|
||||||
|
input#menuUrl.form-control(type='url',ng-model='run.menuUrl')
|
||||||
|
|
||||||
|
button.btn.btn-primary(ng-click="create(run)",ng-disabled="form.$invalid") Create
|
||||||
BIN
views/.layout.jade.swp
Normal file
BIN
views/.layout.jade.swp
Normal file
Binary file not shown.
@@ -9,6 +9,9 @@ html(lang="en",ng-app="lunchApp")
|
|||||||
|
|
||||||
body
|
body
|
||||||
#page.container
|
#page.container
|
||||||
|
header
|
||||||
|
h1 Lunch Run Me!
|
||||||
|
|
||||||
div(ng-view)
|
div(ng-view)
|
||||||
|
|
||||||
// TEMPLATES
|
// TEMPLATES
|
||||||
|
|||||||
Reference in New Issue
Block a user