Posts

Showing posts from May, 2019

Create tree List

///////////////////////Tree Creation/////////////// ///////////////////////Tree Creation/////////////// ///////////////////////Tree Creation/////////////// function setRoot(obj: any, i ? : any, k ? : any) {     obj['root'] = i ? (i + '_' + k) : '0';     obj['expand'] = true;     if (obj.child) {         obj.child.forEach((val, key) => {             setRoot(val, obj['root'], key);         });     } } ///////////////////////Tree Search//////////////// ///////////////////////Tree Search//////////////// ///////////////////////Tree Search//////////////// console.clear(); var items = [     {         name: "a1",         id: 1,         children: [{             name: "a2",             id: 2,   ...

How to BOOT OS

***************************************************** commands are here : diskpart list disk select disk 1 clean create partition primary select partition 1 active format fs=ntfs quick exit after that past Boot file in Driver

Run Angular build using Nodejs

Run Angular build using Node server : server.js const express = require('express'); const app = express(); app.set('port', process.env.PORT||4200); app.listen(app.get('port'), () => {     console.log('Server started!'); }); app.use(express.static('dist/')) app.use(function(req, res, next) {   res.header("Access-Control-Allow-Origin", "*");   res.header("Access-Control-Allow-Headers", "Origin, authentication, X-Requested-With, Content-Type, Accept");   next(); }); app.route('/').get((req, res) => {   var auth_user = req.headers['auth_user'] || 'admin-node';   var host = req.headers['host'] || 'localhost';   var result = {"user":auth_user,"host":host};   res.send(result); });

Angular 4 5 6 Interview Question

Angular 4-5-6 Interview Question /////////// Angualr 2/4/5/6/7 Interview Question /////////// 1.) What are the new features of Angular 4?     Revamped *ngIf and *ng For     Router ParamMap     TypeScript Compatibility     Animations Package     Dynamic Components     Angular Universal     Smaller and Quick     View Engine – AOT Compilation     Flat ES Modules (Flat ESM / FESM)     Source Maps for Templates 2.) Different between  Observable or Promise     Promise:         -A Promise handles a single event when an async operation completes or fails.         -usually only use with async data return         -not easy to cancel     Observable:         -are cancellable         -are retriable by nature such as retry and retryWhen     ...

CSS Polygon

Cross Line :

Angular js Interview Question

/////////// Angualr Interview Question /////////// 1.) Define the features of AngularJS.     The Template (View)     The Scope (Model)     The Controller (Controller)     Services     Filters     Directives 2.) What are the directive scopes in AngularJs?     Parent scope         – Whatever change you make in your directive that comes from the parent scope, will also reflect in the parent scope,         and it is also a default scope.     Child scope         – It is a nested scope which inherits a property from the parent scope. Also if any properties and function on the scope are not         connected with the parent scope directive, then a new child scope directive is created.     Isolated scope         – It is reusable and is used when we build a self-contained directive. It is...