Professional Documents
Culture Documents
Promises are async or parellal flow of execution which can handle single event at a time.
Running state:
pending state:
Obs: Can handle multiple events at a time. prom: can handle single event at a time.
obs: can handle next, complete, error prom: can handle either resolve or reject.
Angular Routing:
3. routerLink: Used to navigate from one component to another component from component.html.
4. router.navigate: Used to navigate from one component to another component from component.ts
based on business logic.
6. wildcard: It is used to handle mismatch path. Wildcard should always at the bottom of routes.
Angular Routing:
2. Param Map: Will get data in terms of Observables we need to subscribe it.
https://jsonplaceholder.typicode.com/users
Angular Guards:
Guards are used to protect the web application from entering into the particular page.
Used for authentication purpose.
Guards will also ask for the permission while leaving any of the component.
can load/fetch the data before landing into the component.
we can create the guards with the help of command: ng g g guardName
1. CanActivate: This guard will give permission to enter into component or not.
2. CanDeactivate: This guard will ask permission to leave from component or not.
4. Resolve: This guard will fetch the information before entering into the component.
Intercomponent communication:
Process of sending data from one component to another component is called as intercomponent
comm.
There are two chances of component communication.
1. If component are in parent and child relationship.
2. If component are not in parent and child i.e. irrelated component.
2. @Output:
It is a decorator used to send the data from child to parent component.
It uses event binding with event emmitter.
3) @ViewChild():
It is used to send the data from child to parent.
It is same as @Output : in @Output only one variable will be passed from child to parent but
in case of @ViewChild we will get
complete control of child component into
parent component so that we can access any properyt or method.
important is that we can fetch the data of child inside parent in ngAfterViewInit method only.
* Intercomponent communication of Sibling or non related Component(i.e. with the help of service):
The process of breaking complete application modular wise and loading module by module is called as
lazy loading.
It will take less time to load the application.
if there is any chnage in module only that module will be rebuild and reload at UI. So here also we are
going to decrease of load time.
And because of above methods lazy loading is going to be faster than eager loading.
home: 200kb
login : 100kb
loan : 300kb
other: 1.1 mb
1. with the help of @input and @output if components are parent and child.
4. Using Routing.
prime Ng:
go to : https://www.primefaces.org/primeng/setup
Angular Deployment :
Angular Versions:
Different Versions:
1: Angular JS ==> It was completely based on JS.
2,4,5,6,7,8,9,10,11,12,13,14
There is no angular version 3 as it was exceeding the version of router. So to avoid the
confusion they decided direcly release angular 14.
Different Env :
Local: Where we can do our development. localhost:4200
dev: Once ur development complete, developer is going to deploy the code at dev env where
developer as well as tester can test the application.
e.g. www.onlinesbi-dev.com
sit: This the staging env used to test the application by tester as well as developer.
e.g.: www.onlinesbi-sit.com
uat: Here client as well as manager can test the code and raise the bugs if found any.
e.g.: www.onlinesbi-uat.com
prod: This is the final env which will be accessed by end user.
e.g. www.onlinesbi.com
Angular 14 Features:
1. Auto compilation: Whenever we create any new basic blocks of angular using CLI then it will
give the suggestions
but the problem is that it will work on only gitbash and for linux user.
2. Strictly typed forms: Till now whevener we are creating formcontrols so we are not able to
give stict type to the field but from
angular 14 we can give the strict type.
Upgrading Angular:
https://update.angular.io/
Angular Unit Test Cases:
It is a process of exminining or testing the specific part of application to make sure it is working fine or
not.
Benefits:
1. Jasmine:
It is an open sourse testing framework/ library.
Using the Jasmine we can write the test cases.
Jasmine provides few important methods:
it(): Declare a perticular test.
describe(): It is suite for test the it().
expect(): It is used to expect or compare the result value.
2. Karma:
It is runnner used to run/ execute unit test cases.
It will provide result as well as code coverage in terms of %.
Angular Concepts:
1. ng-template:
ng-template is template element used to hadle with stuctural directives. i.e. *ngIf, *ngFor,
*ngSwitch
2. ng-container:
This will allow to use multiple directives together without any extra div.
API Integration:
400: Bad request means req api and backend api are not matching with each other.
500: Internal Server Error. Means connection issue bcoz of internet and all.
403: Forbiddent means communication us happening but due to unauthorization not able to serve the
request.
2. Home Screen : Once user navigate to home screen, user can authenticate
their Adhaar and PAN with govt site.
On Home Screen: Below tabs will be there.
a) Authenticate User
b) Your own policies(this will be drop down like car insurance, term,
medical insurance)
c) Company Products
c) India's top to In leading companies plans
d) Compare
e) Ask expert for best plan (create a form inside that expert will call
on that)
f) Why choose our insurance: quick and eacy, low premium, easy claims
g) 24 *7 support page.
h) Contact
i) Govt Crop Insurance
Url:
https://www.policybazaar.com/
https://preview.themeforest.net/item/insubex-insurance-consulting-
angular-template/full_screen_preview/29094666?
_ga=2.248680517.393113280.1664177829-
398429859.1659406914&_gac=1.191346008.1663850152.Cj0KCQjwj7CZBhDHARIsAPPWv3fqQ
LfXpJ2X87lxsavOxbzlKtCqRQa1wg_udgtpeb-TFy9FH9qCO_oaAnSQEALw_wcB
https://truz-ng.envytheme.com/about
https://themeforest.net/search/insurance%20angular
https://www.acko.com/health
Steps:
Create one module inside: Home module and implement lazy loading inside
that.
Requirement:
General term insurance
Health Insurance
Car Insurance
Home Insurance
1. Waterfall Method: Complete development will be done and then project will be handover to the
client.
2. Agile Method: Complete application will be devided based on requirements in terms of sprints.
And application will be delivered to client sprint wise.
Agile Steps:
1. Business Analyst: responsible for communication with client and taking the requirements.
2. BA will collect CRS (Customer/Client Requirement Specification) Document from the client.
3. BA and Scrum master will convert CRS into SRS( Software Requirement Specification).
4. BA and Scrum Master will convert SRS into different sprints based on client features.
5. Scrum Master will create User stories of each sprint.
6. Scrum master will start the sprint.
1 Nov to 3 Nov: Sprint Planning. (Scrum master and Scrum team will have meeitng together
and decide which user storeis we can complete).
4 Nov to 15 Nov: Development will be happen.( Developer)
16 Nov: Application will be deployed to dev/ sit env.
18 Nov to 20 Nov: Application testing (tester). tester will raise bugs/ defects.
23 Nov to 24 nov: Developer will work on defects.
25 Nov: Developer will deploy once again at dev / sit env.
26 Nov: Tester will test all the bugs/ defects allong with all functionality.
27 Nov: Will have demo to the Client.
28 Nov: Once we got permission from client then we will deploy application to the prod env.
29 Nov: Sprint Retrospective: Will have the discussion on complete sprint activity
i.e. what went good and what went wrong in current sprint so that can improve in
next sprint.
30 Nov Application testing.
........
........
........
like wise it will continue.