Ang
Ang
There is also data binding happening between the input fields, for
example, that we display to a user and the data that gets stored in the
components associated code and storage.
Please notice that we can not only have a single component, but we can
also have many components.
Usually, you would create one component for each functionality.
So in that way, when we first load the page, we load it one time, the entire
application.
But then afterwards, as soon as we go to another website in our
application, so we change the route,
for example, or we add something to our application only the changes are
getting updated.
In that way we heavily reduce the loading times because we do not have
to reload the entire application
all the time.
We only update what's getting changed right.
And therefore, we also reduce the server load because we don't have to
update so much data.
And finally, our angular application runs in a web server.
If you still want to install the lastet angular version you will HAVE to add
an additional flag while project creation in order to follow the course: ng
new my-app --no-standalone
npm i @angular/cli
node package manager , install
to install specific version :
npm install @angular/cli!16.1.6 –location=global
cd appoint-app
ng serve
Ng serve
ng serve -o(I’ll open the browser)
Now the most important folder for sure is the source folder, the SRC.
This is where we are working in basically all the time.
And you can see one very specific thing and important thing.
The app- route for our Angular application where basically all of the
action takes place.
This is very simple HTML, we've got a header here and we have a body
and then the body closes and the HTML closes and inside of the body you
can see the app route.
I already told you that components are the building blocks, right
of our angular application.
And our application has one component right now, our root
component, the so called app component.
So take a look here at the app components, the TypeScript file app
components.
Take a look at that one.
Right open up the index.html again, you can see app root, right?
So what he's basically doing is saying, okay, inside here I want to show
the app root component and
then inside of our app components we can see yeah, the selector for this
component here for the app
component is called app root.
Right?
And then associated to this, we got the app components HTML, which is
that file right here and the
app component dot CSS, the correlated styling or the related styling for
this specific component.
So let's open up the app.component.html and voila, you can find all of
the information and styling
and also the content.
So this is how Angular is basically loading this template, right?
So inside of that app component, let's just control A and let's delete
everything.
So save it.
The hot reload mechanism will update the page and now it is
empty.
So now we can create our application from scratch.
I just wanted to explain you how well Angular is basically working
under the hood.
It is empty because inside of the HTML there were some CSS styling
defined.
And then we have the app component which really takes care of, well,
specifying this component.
We will talk about components for sure in depth, but now we have cleaned
our application.
You have already discovered the component that's getting created when
you create a new angular project.
And now it is time to dive a little bit deeper into components so that you
are able to create your own
component for our appointment application.
Ng generate interface models/appointments