Angular Prep Notes
Angular Prep Notes
-------------------------------
console.log(a)
var a = 20;
function fn() {
console.log(a)
var a = 10;
}
fn()
console.log(a)
-------------------------------
console.log(a)
let a = 20;
function fn() {
console.log(a)
let a = 10;
}
fn()
console.log(a)
-------------------------------
console.log(a) // 20
var a = 20;
function fn() {
console.log(a) // 20
var a = 10;
}
fn()
console.log(a) // 10
-------------------------------
console.log(a)
let a = 20;
function fn() {
console.log(a)
let a = 10;
}
fn()
console.log(a)
Response
console.log(a) // error / undefined
let a = 20;
function fn() {
console.log(a) // undefined
let a = 10;
}
fn()
console.log(a) // 20
-------------------------------
let inputArr = [{name: 'raju', id: 1, city: 'hyderabad'}, {name : 'ravi', id: 2, city:'banglore'}]
output should be like [{name: 'Raju', id: 1}, {name : 'Ravi', id: 2}]
-------------------------------
var a = [1,2,3];
var b = a;
b[0] = 9
console.log(a, b);
a = [5,6,7];
console.log(a, b);
Response
var a = [1,2,3];
var b = a;
b[0] = 9
console.log(a, b); // [9,2,3], [9,2,3]
a = [5,6,7];
console.log(a, b); // [5,6,7], [5,6,7]
-------------------------------
1. webpacks
2. minification
3. uglification
4. Is inheritance available in ts
5. Can we use getter setter in ts
6. if yes did we need the syntax get and set here or it is work same as java
7. Js compilation scope
8. This keyword scope in call back
9. Can we use this in call back
10. diff in var and let
11. Why we have let in ts
12. If map and foreach both for iteration then why we have two different
13. If we are declaring model as interface then we need to implement it
14. if we have constructor then why we need ngoninit.
15. is there any extends keyword
16. how to do custom pagination in frontend
17. lifecycle methods
18. pass data among components,
19. Do you know agile and scrum model? If yes, can you explain how does it work and
differentiate it with waterfall execution.
1. What is promise?
2. Advantages of observable over promise.
3. Lazy loading
4. What is CanActive?
5. Bundle block in angular
6. Angular pipe with example? Do you use custom pipe?
7. Let and const difference.
8. What is scope in JS? And how many types of scope available in JS?
9. Why we use angular?
10. Difference between var and let with example
11. Advantages of reactive form
12. Call(), apply() and bind().
13. Arrow function
14. What is meta data and where we use it?
15. Dependency injection.
16. Difference between constructor and ngOnInit. And which one call first?
17. What is module and how to create it?
18. What is constructor do?
19. What type of cloud you use?