Solution
Step 1 : Start Android Studio
Step 2 : Go to Build -> Build Bundles
Step 3 : Select Build APK
Step 4 : Build APK file
Solution
Step 1 : Start Android Studio
Step 2 : Go to Build -> Build Bundles
Step 3 : Select Build APK
Step 4 : Build APK file
Code Example Here
function renameKeys(obj, newKeys) {
const keyValues = Object.keys(obj).map(key => {
const newKey = newKeys[key] || key;
return { [newKey]: obj[key] };
});
return Object.assign({}, ...keyValues);
}
Uses
const obj = { a: "1", b: "2" };
const newKeys = { a: "A", c: "C" };
const renamedObj = renameKeys(obj, newKeys);
console.log(renamedObj);
// {A:"1", b:"2"}
We can 5 ways to create objects in JavaScript.
Lets understand how to Create it...
@Components | @Directives |
For register component we use @Component meta-data annotation. | For register directives we use @Directive meta-data annotation. |
Component is a directive which use shadow DOM to create encapsulate visual behavior called components. Components are typically used to create Ul widgets. | Directives are used to add behavior to an existing DOM element. |
Component is used to break up the application into smaller components. | Directive is used to design reusable components. |
Only one component can be present per DOM element. | Many directive can be used in a per DOM element |
Component is used to define pipes | You can't define Pipes in a directive. |
@View decorator or templateurl template are mandatory in the component. | Directives don't have a View. |
Constructor | ngOninit |
A constructor is not the concept of Angular. It is the concept of JavaScript's class. | ngOninit is the second stage of Angular component lifecycle hook whenever is called when angular is done which creating the component. |
Constructor is best place to add all dependencies | ngOninit function which guarantees you that the component has already been created. |
Constructor is automatically called at the time of creating the object of the class. | Invoked by Angular when component is initialized |
Used for Injecting dependencies | Actual business logic performed |
we should use constructor() to setup Dependency Injection | is a better place to write "actual work code" that we need to execute as soon as the class is instantiated. |
CPU vs GPU Architecture CPU (Central Processing Unit) and GPU (Graphics Processing Unit) have distinct architectural differences, optimize...