Skip to content

Commit 82cd1d8

Browse files
committed
First
0 parents  commit 82cd1d8

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

app.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
angular.module('app', [])
2+
3+
.controller('RootCtrl', ['$scope', function($scope) {
4+
$scope.data = {}
5+
$scope.handleSubmit = function(e) {
6+
console.log('SUBMISSION', e);
7+
console.log($scope.data);
8+
e.preventDefault();
9+
}
10+
}]);

index.html

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!doctype html>
2+
<html ng-app="app">
3+
<head>
4+
<meta charset="utf-8" />
5+
<script src='https://unpkg.com/@ionic/[email protected]/dist/ionic.js'></script>
6+
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
7+
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.6/angular.min.js"></script>
8+
<script src="app.js"></script>
9+
</head>
10+
<body>
11+
<ion-app>
12+
<ion-page class="show-page" ng-controller="RootCtrl">
13+
<ion-header>
14+
<ion-toolbar>
15+
<ion-title>Ionic 4 + AngularJS</ion-title>
16+
</ion-toolbar>
17+
</ion-header>
18+
<ion-content class="content">
19+
<form ng-submit="handleSubmit($event)">
20+
<ion-list>
21+
<ion-item>
22+
<ion-label fixed>Your name</ion-label>
23+
<input type="text" ng-model="data.name" />
24+
</ion-item>
25+
</ion-list>
26+
<ion-button block>Submit</ion-button>
27+
</form>
28+
</ion-content>
29+
</ion-page>
30+
</ion-app>
31+
</body>
32+
</html>

0 commit comments

Comments
 (0)