Week Two of Learning Angular Part 2
March 25, 2021
This is Week Two of Angular Part 2, click here to see Week Two of Angular Part 1.
What else impresses me about Angular so far
I am so excited about their pipes and how easily it is to change the format of your data!
Two-way Binding
Following the Angular Tutorial from Programming with Mosh, I kept getting the following error: "NG8002: Can't bind to 'ngModel' since it isn't a known property of 'input'." After some googling, I realized that with my version of Angular installed, I had to go to my app.module.ts file to add:
Using Bootstrap Icons
Creating a New Pipe
You can create a new pipe in the terminal by typing
Input Properties
Going through the lesson with Mosh at 15%, I couldn't replicate the same results as he did using the same code. It could be that my Angular/TypeScript version is different than his and so the implementation may be different now. I'll need to revisit this!
Cool Tip
A cool tip that I learned is how to change a variable name and let it change the rest of them by selecting the variable name, click F2 and then change the variable name and click 'enter'.
What else impresses me about Angular so far
I am so excited about their pipes and how easily it is to change the format of your data!
Two-way Binding
Following the Angular Tutorial from Programming with Mosh, I kept getting the following error: "NG8002: Can't bind to 'ngModel' since it isn't a known property of 'input'." After some googling, I realized that with my version of Angular installed, I had to go to my app.module.ts file to add:
import { FormsModule } from '@angular/forms';
and include FormsModule under my array of imports.Using Bootstrap Icons
First, npm i bootstrap-icons
. Then add @import "~bootstrap-icons/font/bootstrap-icons.css";
to the style.css file. After that, you can implement the icon of your choice from https://icons.getbootstrap.com.Creating a New Pipe
You can create a new pipe in the terminal by typing
ng g p pipe-name
. Go to that ts file and edit the transform section. Then, in the template or html file, you will implement it.Input Properties
Going through the lesson with Mosh at 15%, I couldn't replicate the same results as he did using the same code. It could be that my Angular/TypeScript version is different than his and so the implementation may be different now. I'll need to revisit this!
Cool Tip
A cool tip that I learned is how to change a variable name and let it change the rest of them by selecting the variable name, click F2 and then change the variable name and click 'enter'.
Posted by Ninja Space Content. Posted In : angular