You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/angular/your-first-app.md
+84-28Lines changed: 84 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,10 @@ sidebar_label: Build Your First App
4
4
---
5
5
6
6
<head>
7
-
<title>Build Your First Ionic Mobile App: Angular Development Tutorial</title>
7
+
<title>Build Your First Ionic Mobile App with Angular | Ionic Capacitor Camera</title>
8
8
<meta
9
9
name="description"
10
-
content="Ionic's single codebase builds for any platform using just HTML, CSS, & JavaScript. Develop your first mobile app with our step-by-step Angular tutorial."
10
+
content="This Angular tutorial teaches the fundamentals of Ionic app development by creating a realistic app step-by-step. Learn to run your first Ionic app with Angular."
11
11
/>
12
12
</head>
13
13
@@ -34,11 +34,11 @@ We'll create a Photo Gallery app that offers the ability to take photos with you
34
34
35
35
Highlights include:
36
36
37
-
- One Angular-based codebase that runs on the web, iOS, and Android using Ionic Framework [UI components](https://ionicframework.com/docs/components).
37
+
- One Angular-based codebase that runs on the web, iOS, and Android using Ionic Framework [UI components](../components.md).
38
38
- Deployed as a native iOS and Android mobile app using [Capacitor](https://capacitorjs.com), Ionic's official native app runtime.
39
-
- Photo Gallery functionality powered by the Capacitor [Camera](https://capacitorjs.com/docs/apis/camera), [Filesystem](https://capacitorjs.com/docs/apis/filesystem), and [Preferences](https://capacitorjs.com/docs/apis/preferences) APIs.
39
+
- Photo Gallery functionality powered by the Capacitor [Camera](../native/camera.md), [Filesystem](../native/filesystem.md), and [Preferences](../native/preferences.md) APIs.
40
40
41
-
Find the complete app code referenced in this guide [on GitHub](https://github.com/ionic-team/photo-gallery-capacitor-ng).
41
+
Find the [complete app code](https://github.com/ionic-team/tutorial-photo-gallery-angular) referenced in this guide on GitHub.
42
42
43
43
## Download Required Tools
44
44
@@ -47,9 +47,8 @@ Download and install these right away to ensure an optimal Ionic development exp
47
47
-**Node.js** for interacting with the Ionic ecosystem. [Download the LTS version here](https://nodejs.org/en/).
48
48
-**A code editor** for... writing code! We are fans of [Visual Studio Code](https://code.visualstudio.com/).
49
49
-**Command-line interface/terminal (CLI)**:
50
-
-**Windows** users: for the best Ionic experience, we recommend the built-in command line (cmd) or the Powershell
51
-
CLI, running in Administrator mode.
52
-
-**Mac/Linux** users, virtually any terminal will work.
50
+
-**Windows** users: for the best Ionic experience, we recommend the built-in command line (cmd) or the Powershell CLI, running in Administrator mode.
51
+
-**Mac/Linux** users: virtually any terminal will work.
53
52
54
53
## Install Ionic Tooling
55
54
@@ -71,10 +70,10 @@ Consider setting up npm to operate globally without elevated permissions. See [R
71
70
72
71
## Create an App
73
72
74
-
Next, create an Ionic Angular app that uses the “Tabs” starter template and adds Capacitor for native functionality:
73
+
Next, create an Ionic Angular app that uses the "Tabs" starter template and adds Capacitor for native functionality:
Some Capacitor plugins, including the Camera API, provide the web-based functionality and UI via the Ionic [PWA Elements library](https://github.com/ionic-team/ionic-pwa-elements).
101
+
Some Capacitor plugins, including the [Camera API](../native/camera.md), provide the web-based functionality and UI via the Ionic [PWA Elements library](https://github.com/ionic-team/pwa-elements).
// Call the element loader before the bootstrapModule/bootstrapApplication call
117
+
//CHANGE: Call the element loader before the `bootstrapModule` call
116
118
defineCustomElements(window);
119
+
120
+
platformBrowserDynamic()
121
+
.bootstrapModule(AppModule)
122
+
.catch((err) =>console.log(err));
117
123
```
118
124
119
125
That’s it! Now for the fun part - let’s see the app in action.
@@ -128,55 +134,105 @@ ionic serve
128
134
129
135
And voilà! Your Ionic app is now running in a web browser. Most of your app can be built and tested right in the browser, greatly increasing development and testing speed.
130
136
131
-
## Photo Gallery!!!
137
+
## Photo Gallery
132
138
133
-
There are three tabs. Click on the Tab2 tab. It’s a blank canvas, aka the perfect spot to transform into a Photo Gallery. The Ionic CLI features Live Reload, so when you make changes and save them, the app is updated immediately!
139
+
There are three tabs. Click on the "Tab2" tab. It’s a blank canvas, aka the perfect spot to transform into a Photo Gallery. The Ionic CLI features Live Reload, so when you make changes and save them, the app is updated immediately!
134
140
135
141

136
142
137
-
Open the photo-gallery app folder in your code editor of choice, then navigate to `/src/app/tab2/tab2.page.html`. We see:
`ion-header` represents the top navigation and toolbar, with "Tab 2" as the title (there are two of them due to iOS [Collapsible Large Title](https://ionicframework.com/docs/api/title#collapsible-large-titles) support). Rename both `ion-title` elements to:
163
+
`ion-header` represents the top navigation and toolbar, with "Tab 2" as the title (there are two of them due to iOS [Collapsible Large Title](../api/title.md#collapsible-large-titles) support). Rename both `ion-title` elements to:
We put the visual aspects of our app into `<ion-content>`. In this case, it’s where we’ll add a button that opens the device’s camera as well as displays the image captured by the camera. Start by adding a [floating action button](https://ionicframework.com/docs/api/fab) (FAB) to the bottom of the page and set the camera image as the icon.
185
+
We put the visual aspects of our app into `<ion-content>`. In this case, it’s where we’ll add a button that opens the device’s camera as well as displays the image captured by the camera. Start by adding a [floating action button](../api/fab.md) (FAB) to the bottom of the page and set the camera image as the icon.
Save all changes to see them automatically applied in the browser. That’s just the start of all the cool things we can do with Ionic. Up next, implement camera taking functionality on the web, then build it for iOS and Android.
238
+
That’s just the start of all the cool things we can do with Ionic. Up next, implement camera taking functionality on the web, then build it for iOS and Android.
0 commit comments