Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

HTML Css

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 34

Sr.

No Questions

1 What is ngModule?

2 What is service and why it written?

3 How we can create directive using cli?


4 Where service can define?
5 How we can call the component?

6 Angular 2 life cycle?

7 What is constructor in component?

8 What is comoponent?

9 What is Diff between ngOninit() and constructor?

10 what is routing?

11 what is difference between component and directive?

12 Diff between defined and undefined?

13 Diff between librabry and frameworks?


14 What is decorator?
15 Do you know metadata?
16 What is event emittier?
17 Can we create our custom event ?

18 What is view encapsulation?

19 What is a promise?

20 What is observable?
21 Difference between promises and observables?
22 What is injectable?
23 Waht is ngDoCheck?
24 Is it possible to add multiple CSS inside component?
25 Exceptation handling in JS?

26 What is Dependency Injection?

27 How can we host project ?

28 Diff Between template driven forms and reactive forms?

29 What is piping in Angular? How we can create custom pipe in angular 4?

30 What is AOT and JIT ?

31 Write a code communicate with 2 components


32 How two way data binding works internally?
33 Write an array and put values in dropdown list?
How to pass variables from one comp to another comp? How many ways ?
34 which method is better?
35 In angular how to check two array same or not?

36 How to handle 1000 API in promise?


37 How to call multiple API in angular?

38 Diff bet compenent attribute directive and structural directive?


39 Is it possible to create custom structural directive? how to create?
40 Use of array in angular ?
41 How to handle duplicate value in array ? write a code?
42 In Component .ts file how to communicate with .html file.
43 what is use of map functions in RxJS?
44 Explain Angular ?
45 for(var i=0; i<10 ; i++) { setTimeout(()=>{ console.log(i)}, 1000*i); }
46 What Is The For Root Method?

47 What Is Json Web Token or JWT ?


Take an input from user as number. And check whether this number is prime
48 number or not.
49 how to two component are comunicating echa other
50 One parent and two child commponet communication
51 Role of constructor in angular
52 how to load bootstrap in angular ?
53 Difference between forRoot() and forChild()
54 what is view encapsulation?
55 How to write test cases in angular using karma and jasmine?
What is AOT and JIT? Will you plz tell me practically how it works? Which one is
56 better?

57 What is lazy loading ?


59 what is authentication in angular ?
60 What is interface in angular and what exactly they do ?
61 How to achieve logic of promise function using call back function?
62 how to handle 1000 API request on same server using promise or observable?
63 What is angular auth guard and how it works?
64 What is loadChildren ?

65 What is mean by angular good practice ?


66 What comes 1st constrouctor or ngOnint() ?
67 Tool exprince to debbuging angular
68 Create service call API using http and show data
69 Explain Project structure
70 Which tools ur using to devlope project
71 how to bootstrap project using ur home commponent
72 how to load another module at runnig application

73 who to achive browser compatiblity

74 diff bet get and post method?


In following program find common element in array single line? var a=
75 [1,2,3,3,4];

76 diff bet ngstyle and ngclass?


77 How to display common html element in other component?
If ngoninit() and ngonchanges() are called before in so whats role for
78 constructor ?
79 Is it possible to call method in constructor?
80 Diff bet ActivatedRoute and RouterState?
81 what is canActivate?
82 What is *ngForOf ?
83 Explain Implements vs extends?
84 Explain Inheritance using typescript?
85 What are Singleton services?
86 What is a guard?
87 What is a Super keyword in JS ?
88 How to communicate component to template ?
89 What is a share Modules ?
90 What is a promise?
91 Diff betn promise and observable?
92 What is closure? Explain with example? Why we use it?
93 write a angular custom service ?
I have one variable whose type I don't know (undefined or null or object) . And
then I have assigned one method to that variable. Write a condition to execute
94 that method without any complie time erroer?
IF a=[1,2,3,4,5,6,7,8,9] Separate the element greater than 7? I will change the
95 order of element without for loop?
96 Let a={"name": "gorakh"}, let b={"age":29} copy both object in let c?

97 Difference between setTimeOut() and setImmediate() and setInterval?

98 Diff bet package.json and package-lock.json ?

99 What is tsconfig.json file and diff bet tsconfig.json and package.json?


100 What is nested comp and how to communicate ?
101 2
102 How to pass one template and to another template ?
103 Diff betn Function defination and fun declaration ?
104 Diff betn normal func and arrow fun ?
105 How to convert ts code to js code ?
106 Difference between ES5 and ES6?
107 What is unit testing in angular ?
108 How does an Angular application work?
109 What are some of the advantages of Angular over other frameworks?
110 What is the difference between Angular and AngularJS?
111 What are some advantages of using Angular?
112 What do you mean by data binding?
113 Describe the MVVM architecture.
114 navigating between different routes in an Angular application.
115 Explain Angular Authentication and Authorization.
116 What are the building blocks of Angular?
117 What is DOM?
118 What is bootstrapping process ?
119 What does subscribing mean in RxJS?
120 What is multicasting in Angular?
121 What are HttpInterceptors in Angular?

122 What is the purpose of async pipe?


123 What is the difference between pure and impure pipe?
124 What is the purpose of Wildcard route?
125 What is the purpose of common module?
126 What is Angular Ivy?
127 How to use polyfills in Angular application?
128 How do you test Angular application using CLI?
129 What are the best practices for security in angular?
130 Is mandatory to pass static flag for ViewChild?
131 What is the precedence between pipe and ternary operators?

132 What is an entry component?


133 What are feature modules?
134 What is the difference between interpolated content and innerHTML?
135 What are the differences between ngmodule and javascript module?

136 What happens if browserModule used in feature module?

137 What is a shared module ?


138 What are reactive forms?
139 What are template driven forms?
140 What is the purpose of FormBuilder?
141 How do you verify the model changes in forms?
142 How do you reset the form?
143 How do you chain pipes?
144 What is the purpose of the tsconfig.json file?
Answers
It is a decorator. Also responsible for creating another modules. Ng g m moduleName. Two types
of module i.e. root module and feature module. We can change our root module from main.ts
It is class with methods and properties. used to separate UI and business logic. Also used inter
component communication. Ng g s serviceName.
Responsible for adding and removing elements from DOM as well changing behaviour of the
DOM. Three types of directives. Component, structural, attribute. Ng g d directiveName.
at component level or at module level and can access through out the application.
with the help of the selector of component we can call the component.
ngOnchanges, ngOnInit, ngDochek, ngAfterContentInit, ngAfterContenCheck, ngAfterViewInit,
ngAfterViewCheck, ngDestory
Responsible for object crestion of the class. It is not a part of angular life cycle. Also helps for
dependency Injection.
Component is collection of class, template and decorator. Basic building block of angular. It is an
directive with their own template. One root comp and many feature comp. Each comp having
their own selctors. Ng g c compName
onInit is part of lifecycle but constructor is not. onInit is responsible for initilization of all variables
inside a DOM. Constructor is responsible for object creation of the class. Constructor will call first
then oninit.
It is an path segment and responsible for navigating from one comp to another comp. Raouting
available from @angular/router package.
component itself a directive with their own template but other directive doesn't have their own
template.
defined: variable is declared as well as value is assigned to it. Undefined: Variable is declared or
not declared but value is not assigned. Data type of undefined is undefined itself.

Library is collection of classes and methods at single point. But framework is collection of libraries.
Decorator tells to angular, how to process on the class. @component
Gives extra information about the decorator.
Used to send the forcefully from child to parent. As well as used to capture custom events.
by attaching @output decorator with the help of event emmitter.

Apllying css of parent and child depending on condition called as view encapsulation. There three
ways 1. none(plain css) 2. default(Angular's by default option) 3. Native(Native shadow dom)

It is async or parellal flow of execution which can handle single event at a time. Added in ES6.
Promises has two events out of which one will be executed at a time i.e. resolve and reject. If
condition is true then resolve will be executed unless reject will be executed. Promises does have
error handling capability and can not be cancelled. promises doesn't require to subscribe.

It is async or parellal flow of execution which can handle multiple event at a time. It came from
RxJs library and availble from old javascript. Obs can handle three events i.e. next, complete and
error. Obs has error handling capability unlike promises. Obs can be cancellables. Obs needs to be
subscribe at any cost. Obs are like promises will more facilities. Obs provides operators like
subject, behaviour subject, map, filter, pipe, from, of, reduce.

availbale in service, also responsible for injecting one service into another service.
Part of angular life cycle and used to change detection purpose.
Yes
with the help of try and catch block simply like if else block.
It is a pattern of class coding in which class recieves its dependency externally rather than creating
itself. Constructor is reposnsible for DI.
When we run ng build command we will get dist folder of minified js, html, css files. That folder
we need to put on c-panel/ hosting location.

Template Driven: Max logic written in html, require ngModel, used simple scnarios, complex for
validation as well testing. require FormsModule to be imported. Reactive : Max logic written in ts
file, doesn't require ngModel, used complex scnarios, less complex for validation as well as testing.
require ReactiveFormsModule to be imported
Used to transfer the data from one form to another form, two types built in and custom pipes.
Custom pipe can be created with ng g p pipeName. We need to call the selector of custom pipe in
comp.html.

AOT: download and Convert code into minified js before browser run the code. Faster. Suitable for
production mode, less bundle size, less loading time. From angular 12 AOT mode will be by
default. JIT: Browser download code and convert to minified js after browser run the code. Less
faster, max bundle size, used development mode.

There are two ways to communicate between components. 1. Parent-child:


a) Input: Comm from parent to child. c) Output: comm from child to parent. C) viewchild: comm
from child to parent. 2. Sibling comp: a) Service: comm from one comp to another comp using
subject and behaviour subject. b) Routing: can pass data through routing.
Two way data binding is combination of event and attribute binding.
Write array in ts file and use *ngFor with select option in html.
which method is better?:=> It competely depends in scenario if comps are parent and child then
we will use Input, Output or Viewchild but if comp are siblings then will use service.
Do it on yourself.

Using promise.all method we can call multiple API's. And using .then method we can get the data.
1. Using promise.all method 2. forkJoin() method.
Attribute Dir: Responsible changing behaviour of the DOM. ngClass, ngStyle. Structural Dir:
Adding and removing elements from the DOM. *ngIf, *ngFor, *ngSwitch.
Yes with ng g d dirName.
var a=[1,2,3,];
Do it on yourself.
Using data binding.
Maps the data and convert it into new observable.
Angular is framework based on JS and TS. Used for SPA.
Do it on yourself.
Used to bind routes with root module i.e. app module.

JWT is used authentication purpose. Token will be generated during first or login API and saved at
UI(localstorage or session storage) as well as backend. Now when we call another API that token
will compare. If tokens are matching then data will be sent to UI otherwise will not get the data.

Do it on yourself. (implement in plain JS)


npm install --save bootstrap. And import path of files in style.css
forRoot defines the route for root modules. forChild defines the route for child Modules.

Inside spec.ts file we can write test cases.

Now AOT will be by default in from angular 12. And AOT is better than JIT.
To decrese loading time we are converting our complete project in moduler structure. Only those
modules will be loaded at a time which are used on browser.
Using guards and JWT we can implement authentication in angular.
Used for strict coupling of the data.
Question from node.js
promise=> promise.all observables=> forkJoin()

To load feature module.


1. Use Feature of ES6, 2. Use lazy loading, 3. Avoid use of 'any' type. 4. Cache API after use. 5.
Avoid to write logic in template
consturctor.
Using the debugger
do it on yourself

VS code, git, angular, bitbucket, JIRA


from app module .ts
using lazy loading.
Check application on all the browser. If for any specific browser application is not working
properly then we need to write settings in polyfills.ts file.
Get: less secure, used for only get the data and having size limitations. Post: More Secure, used for
send as well as get the data, no size limitations

with then help of new Set operator.


in ngStyle we can apply css inline but in ngClass we need to apply css through the class i.e. css or
ts file.
with the help of viewChild and ng-content options

Consturctor is reposible for object creation of the class.


Yes

It is guard used with route to give the permission to enter into component or module.
Used in angular Js same as *ngFor.
Extend: Used to import class. Implements: Used to import the interface.
Accessing methods and properties of parent class in child class is called as inheritance.
AT a time only one object will be created for the service.
Used to authentication purpose.
Will act like an inheritance
using binding
ng g s serviceName Built in service: http client

do it on ur self
1. spread operator. 2. object.assign
setTimeout: will execute after given time. setImmediate: will execute immediately like call back
funct. setInterval: will execute repeatedly for give time. To stop interval need to use
clearInterval(intervalName)
The package. json is used for more than dependencies - like defining project properties,
description, author & license information, scripts, etc. The package-lock. json is solely used to lock
dependencies to a specific version number
Compilation as well as transpilation options are available in tsconfig.json but in package.json
depencies are there. Transpilation: TS to JS. Compilation is JS to minified JS.
Input, Outpu, ViewChild

viewChild, ng-content

Arrow functions can never be used as constructor functions.


tsc abc.ts
https://www.javatpoint.com/es5-vs-es6

SPA, custom component, testing, Cross platform, separate ts, html, css. Routing
ANgularJS: Completed based JS. Angular : Based TS and JS

Model View View Model

Athentication: JWT, Authorization: Guards


component, service, module, directive, data binding, pipe,
DOM is a tree of HTML tags

convert data from Obs to readable format.


subject and behaviour subject are multicasting operators.

The async pipe subscribes to an Observable or Promise and returns the latest value it has emitted.
Pure Pipe: Wherever data chnages Impure Pipe: On change of evry life cycle method.
Used to handle wrong/ mismatch of path in the application.
Common mudule are reposible for importing directive, templeting, core functinality of angular.
IVY is an engine used to run angular code internallly.
Used for browser compatibility.
ng test
use of JWT and guards.
no
The pipe operator has a higher precedence than the ternary operator
Suppose I want to load one component before redndering all other feature module and
component. SO with the help of entrycomponent I can use that comp without calling selector of
that perticular comp

both are used to bing the data.


JS Module: collection of classes. ngModule: decorator, import, export, provider, bootsrap.
browser module consist of all core elemets of angular. Feature module: depends on client
requirement.
A Shared Module is used to organize a set of commonly used pieces into one module and export
them to any module that imports the Share Module

multiple pipes combine at a time.


TS to minifed JS
Comments
MVC
Sr No Questions
1 What is any type, and when to use it?

2 What is closure?
3 What are datatype in javascript?
4 What strict Mode in javascript?
5 What is variable typing?
6 What is call back function in JS?
7 What is splice? How can I replace chars inside the string?
8 Solve 10+20+’30’ and ‘10’+20+30 and 10 + '20' + 30
9 Difference between local storage, session and cookie?
10 What is light weight JS or J Query?
11 How can we hide any div using JS not by angular ?
12 WAP to print hello1 hello2 hello3 without usnig loop?

13 What is the difference between calback and promises?


14 What is the data type of null ? what is the data type of undefined?
15 var a={ } var b={ } console.log(a==b); console.log(a===b)-------??
function abc(x) { return (y){ return (x+y) } then how we call above function so that
16 output should be addition?
a={1,2,,,,,,,10} then length of a? and what are other elements empty or null or
17 undefined?
18 What is negative infinity?
If the array “foo” has a length of 10, what is the index of the first element in the
19 array?
If the array “foo” has a length of 10, what is the index of the last element in the
20 array?
function hi(h, j=10){ console.log(h +j ) } And call this function as
21 hi(10) and hi(10,50) What will be the output in both cases?
22 abcz = "abc_100_pqr_50_10_xyz" solve it for getting output 160
23 What is diff between ES5 and ES6 ?
24 What is a call() method in JS?
25 what is const ? how to use const in es6?
26 In which way we can insert element to array?
27 how to add the data in array in es6?
28 Write a program for find a prime number?
29 Write a program for palindrome number?
Write a program in JS :- Input :- var abc="ABC123PQR456XYZ789" OUTPUT :-
30 ABCPQRXYZ123456789
31 If s="This is javascript." check whether "script" string is there or not?
32 a=["A", "B" ,"Man", "Dog", "cat"] check whether "cat" string is there or not?
33 Ashynchornus in java script
34 Splice function in JS?
35 Why we go for type script
36 What is hoisting in javascript?
37 Prototype Inheritance in javascript?
38 Diff bet call() and apply() in javascript?
39 Diff bet Settimeout() and Set-timeinterval
40 Data types jn JS?
41 variable hoisting in js?
42 Prototype in js?
43 Closure ?
44 promise?
45 promise.all() ?
46 How to covert ts code into js code ?
47 Function and arrow fun? Very imp**
48 What are the different keywords to declare variables in TypeScript?
49 Ways to create objects in TypeScript?
50 How to specify optional properties in TypeScript?
51 What is null and its use in TypeScript.
52 What is undefined in TypeScript?
53 What is the typeof operator? How is it used in TypeScript?
54 Explain the TypeScript class syntax.
55 Explain the arrow function syntax in TypeScript.
56 Provide the syntax for optional parameters in TypeScript.
57 What is an interface?

58 Explain the various ways to control member visibility/ accessibility in TypeScript.


60 What are anonymous functions? Provide their syntax in TypeScript.
61 Explain the concept of inheritance in TypeScript.
62 What are conditional types? How do you create them?
63 What are the main features of TypeScript?
64 What are the benefits of using TypeScript?
65 What are the built-in data types of TypeScript?
66 What are modules in TypeScript?
67 How do you create a variable in TypeScript?
68 What are getters/setters in TypeScript? How do you use them?
69 What are classes in TypeScript? How do you define them?
70 How do you compile a TypeScript file?
71 What is callback hell in js ?
72 What is diiference between let and var?
how many ways to create object in javascript ? and what's difference between
73 them?
74 what is closure? why we written closure?
what o/u of following programme :: var a,b; a=1,b=2; console.log(a+b);
75 console.log(a-b);
76 What are the methods to create objects?
When we don’t know exact data type then we can use it.
Function inside function. That inner function will access outer function
variables
Primitive: number, string, boolean, undefined, null. Non-primitive: Object
Need to define datatype at any cost otherwiell will get error.
u can set value of different types to a single variable. a =10; a = "CTS"
function calls itself after execution of code. E.g. settimeout()
used to add or remove element from the array.
3030 102030 102030

JS
do it on urself
do it on urself

callback doesn't have error handling capability. Priomie will surely give output
object undefined
false false--- do it on urself

do it on urself

do it on urself
negative number devided by zero

do it on urself
do it on urself

do it on urself
re declaration is not possible
push, splice, spread, unshift

do it on urself
do it on urself

do it on urself
do it on urself
do it on urself

to achive OOPS
if variable used before defining it is called as variable hoisting console.log(a); var a= 5;
using prototype keyword we can achive inheritance in plain JS.
var let const this

function abc(num1 , num2?){}

private, public, protected


function without name

ternory operator
do it on urself
do it on urself
do it on urself
do it on urself
do it on urself
do it on urself

tsc abc.ts
do it on urself
let block scope and var functional scoep

do it on urself
do it on urself

do it on urself
do it on urself
Sr No Question

1 What is new in HTML5?

2 what is Docktype ? is it mandetory

3 what is form element in html5

4 Difference between semantics and non-semantics in html5

5 what is box model in CSS3 ? what is sequence for that

6 Difference between inline and external css3

7 boostrap layout
8 classes of bootstraps
9 Diff bet span and div ?

10 Diff bet Visiblity hidden vs display none in CSS3?

11 Diff bet SVG vs CANVAS ?


12 Symatic and non-symantic tag

13 What are CSS selectors?

14 What is a Opacity in css ?

15 What is CSS box model ?

16 Z-index in css?
17 CSS position,display attribute
18 How to achieve responsive design

19 Doctype in html
20 Bootstrap classes to make web page responsive?

Write CSS code to show backgroung image and on that text will be
21 there?
If I have 3 text fields in html then I want to focus on one text box
when comp loads?
diff bet local and session storage?
Features Html

definition A hypertext markup language (HTML) is the primary language for


developing web pages.
Multimedi Language in HTML does not have support for video and audio.
a support

Storage The HTML browser uses cache memory as temporary storage.

Browser HTML is compatible with almost all browsers because it has been
compatibi present for a long time, and the browser made modifications to
lity support all the features.
Graphics In HTML, vector graphics are possible with tools LikeSilver light,
support Adobe Flash, VML, etc.
Threading In HTML, the browser interface and JavaScript running in the same
thread.
Storage Uses cookies to store data.
Vector Vector graphics are possible with the help of technologies like VML,
and Silverlight, Flash,etc.
Graphics
Shapes It is not possible to create shapes like circles, rectangles, triangles.

Doc type Doctype declaration in html is too long


<! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 4.01 // EN"
"http://www.w3.org/TR/html4/strict.dtd">
Character Character encoding in HTML is too long.
Encoding <! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 4.0 Transitional //
EN">
Multimedi Audio and video are not the part of HTML4.
a support

Vector In HTML4, vector graphics are possible with the help of techniques like
Graphics VML, Silver light and Flash.
Html5 uses cookies.
Shapes It is not possible to draw shapes like circles, rectangles, triangles.

Browser Works with all older browsers


Support

<div>
Block element
Used for CSS based HTML Layouts
Support align attribute, div tag displayed in new line
Used to wrap a section that requires highlighting
Answer
HTML5 is a new version of HTML with new functionalities with
markup language with Internet technologies. Language in
HTML does not have support for video and audio

The HTML document type declaration, also known as


DOCTYPE , is the first line of code required in every HTML or
XHTML document. The DOCTYPE declaration is an instruction to
the web browser about what version of HTML the page is
written in
The HTML <form> element can contain one or more of the
following form elements: <input> <label> <select>
<textarea><button>

A semantic element clearly describes its meaning to both the


browser and the developer. Examples of non-semantic
elements: <div> and <span> - Tells nothing about its content.
Examples of semantic elements: <form> , <table> , and
<article> - Clearly defines its content.

The CSS Box Model


In CSS, the term "box model" is used when talking about design
and layout. The CSS box model is essentially a box that wraps
around every HTML element. It consists of: margins, borders,
padding, and the actual content.

Inline CSS: Requires the style attribute placed inside an HTML


element. Internal CSS: Requires the <style> element placed
inside the head section of an HTML file. External CSS: Requires
the <link> element placed inside the head section of an HTML
file

There are two major layouts for Bootstrap that are Fluid Layout
and Fixed Layout.Fluid-layout: This uses the bootstrap .
container-fluid class for the layout. This layout uses
proportional values such as measuring units for a block of
content, images, or any other item

refer below
visibility:hidden hides the element, but it still takes up space in
the layout. display:none removes the element from the
document. It does not take up any space.

The<canvas> element is a container for graphics. SVG gives


better performance with smaller number of objects or larger
surface. Canvas gives better performance with smaller surface
or larger number of objects. SVG is vector based and composed
of shapes.
A semantic element clearly describes its meaning to both the
browser and the developer. Examples of non-semantic
elements: <div> and <span> - Tells nothing about its content.
Examples of semantic elements: <form> , <table> , and
<article> - Clearly defines its content.

Simple selectors (select elements based on name, id, class)


Combinator selectors (select elements based on a specific
relationship between them)
Pseudo-class selectors (select elements based on a certain
state)
Pseudo-elements selectors (select and style a part of an
element)
Attribute selectors (select elements based on an attribute or
attribute value)
The opacity CSS property sets the opacity of an element.
Opacity is the degree to which content behind an element is
hidden, and is the opposite of transparency.

The CSS box model is essentially a box that wraps around every
HTML element. It consists of: margins, borders, padding, and
the actual content. The image below illustrates the box model:

The z-index property specifies the stack order of an element.

An element with greater stack order is always in front of an


element with a lower stack order.

Note: z-index only works on positioned elements (position:


absolute, position: relative, position: fixed, or position: sticky)
and flex items (elements that are direct children of display:flex
elements).

DOCTYPE> declaration. The declaration is not an HTML tag. It is


an "information" to the browser about what document type to
expect. In older documents (HTML 4 or XHTML), the declaration
is more complicated because the declaration must refer to a
DTD (Document Type Definition

body {
background-image: url("paper.gif");
}
Html5

HTML5 is a new version of HTML with new functionalities with


markup language with Internet technologies.
HTML5 supports both video and audio.

HTML5 has the storage options like:application cache, SQL


database, and web storage.
In HTML5, we have many new tags, elements, and some tags
that have been removed/modified, so only some browsers are
fully compatible with HTML5.
In HTML5, vector graphics are supported by default.

The HTML5 has the JavaScript Web Worker API, which allows the
browser interface to run in multiple threads.
Uses local storage instead of cookies
Vector graphics is an integral part of HTML5, SVG and canvas.

We can draw shapes like circles, rectangles, triangles.

The DOCTYPE declaration in html5 is very simple "<! DOCTYPE


html>

Character encoding declaration is simple <meta charset = "UTF-


8">

Audio and video are essential parts of HTML5,like: <Audio>,


<Video>.

Vector graphics are an integral part of HTML5, SVG,


and canvas.
It supplies local storage in place of cookies.
Using html5, you can draw shapes like circles, rectangles,
triangles.
A new browser supports this.

<span>
Inline element
Used to stylise text
No align attribute, does not begin a new line
Wrap any particular word and to highlight it
Sr No. Questions
1 What is Git and why is it used?

2 What is a git repository?


3 What does git clone do?
4 What does the command git config do?

5 What is a conflict? How to resolve git conflict ?


6 What does git status command do?

7 What does git add command do?


8 How will you create a git repository?

9 Tell me something about git stash?


10

11 What is the command used to delete a branch?

12 Differentiate between git pull and git fetch.


13 Tell me all the commands of git ?
14 What are bitbucket features?
15 What is the difference between GIT and Bitbucket?
16 How do you manage bitbucket code?
17 How does Bitbucket work with GIT?
18 What is Agile Methodology ? what is User Story ?
19
20
Answers
Git is code versioning system and used to store the code.

Repositories in GIT contain a collection of files of various different versions of a Project.


It downloads the git repositiory data into loacal server/ machine.
Git config is basically gives few optins for git account setting.

If more than one deverloer is going to commit the code in same file inside same
branch then git will confuse whose code should take so this will give conflict.
There are few ways to resolve conflict. 1. By Accpeting current changes: Will
accept only your code and will replace earlier code. 2. Accpeting both chnages :
Will accept both code. 3. BY accpeting Incoming Changes : accept other
developer code(latest code wchich will available at the branch) and your code
will get replace.
It gives the stautus of changed files as well as added files.
Will add files from local to git stage. Command: git add path ===> will add the
files from that path only. Git add . ===> will add all the files where the
developer has made the chnages.
git remote add origin git@github.com:username/new_repo
1. Save changes to branch A. 2. Run git stash. 3. Check out branch B. 4. Fix the
bug in branch B. 5. Commit and (optionally) push to remote. 6. Check out
branch A 7. Run git stash pop to get your stashed changes back.

For local : 1 git branch -d <branch_name> ===> will delete branch if all your
current branch code has been merged into main branch. 2 git branch -D
<branch_name> ===> will delete current branch forcefully without checking
code megrge status. For remote: git push <remote_name> --delete
<branch_name> ====> will push all the code to main branch and delete the
current branch.
git pull : will take latest code from remote branch. Git fetech: will inform only
chnages but not actully taking pull.

Can easily track pull, push, merge request as well as status of all branches.
Cognizant

1 Angular Workspace
Angular Web components/ Angular elements not angular
2 component
3 PWA
4 Decrease loading time
5 diff bet ng 2 and 4.
6 state management in angular
7 diff bet const and readonly
8 diff bet mutable and immutable object in JS
9 What is subject
10 Diff bet switch map and merge map
11 Service workers
13 features of angular 13
14 const arr = [1, 2] can we push element to array

15 Why we write only private while importing service


16 If we have one promise and one observable calling from
same comp at same time which will call first ?

17 Are u able to write test cases ?


What is your project and and what are the challenges that u
18 face in your project ?
Deployed to prod and if causes a probem then how to
19 handle
20 web sockets
21 web bundling
22 Share directive from one module and another module
23 What has been chnaged in AOT ?
24 Angular tree shaking
25 Diff between defined and undefined?
26 variable hoisting ?
27
28
29 Hostlistner Vs
30 Web elements
31 Web components
32 Dynamic Components
33 Diff bet hostlistner and event emmitter
34 AOT and JIT
35 [1,2,2,4,1,'a','b'] wap to get output 1: 1 , 2: 2, 4:1
36 What is the benefit call and apply
37 prototye in JS
38 closure in JS
39 HTML 5 features
Synamtic and non symantic main diff ? Not only meaning to
40 developer or browser
41 Why SCSS is used ?
42 How to compile SCSS to CSS ?
43 Directive, Pure impure pipe
44 Mirco components
45 Why service is called singleton ?
46 Design pattern in angular ?
Answers

Normally with the help of ng new demo we can create new single angular project. But if we want to create multiple projects o
share libraries between projects then it is possible with the help of angular workspace. To Achieve this: ng new my-workspace
create-application false this will create workspace without scr folder but with node_modules. Now if I want to create angular
inside that then go inside my-workspace and run ng new application my-first-app also we can create another project at same
location ng new application my-second-app

Special type of multicast operator used for intercomponent communicatin using the service.
switchMap cancels previous HTTP requests that are still in progress, while mergeMap lets all of them finish.

Yes
Concept of dependency injection. As service is singleton we need the scope of service inside the class only that's why we are u
private

Promise will call first as observables are lazy until and unless we subscribe the data observable is not going to execute.
Yes

ROPA

Production has debugging tools

Angular tree shaking,


Unused code removed at the compilation.
27051
-800

You might also like