Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View codediodeio's full-sized avatar
🤹‍♂️
hardly working

Jeff Delaney codediodeio

🤹‍♂️
hardly working
View GitHub Profile
@staltz
staltz / introrx.md
Last active April 20, 2024 14:15
The introduction to Reactive Programming you've been missing
@codediodeio
codediodeio / config.js
Last active April 16, 2024 04:46
Snippets from the Firestore Data Modeling Course
import * as firebase from 'firebase/app';
import 'firebase/firestore';
var firebaseConfig = {
// your firebase credentials
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE

Angular Interview Questions

Some basic questions going from easy to difficult. A more exhaustive list of more questions from the community can be found here.

Easy

  • Whats the difference between components and directives? [ANSWER]: Components are widgets while directives more like decorators for elements and/or components.
  • How do you get a reference to a child component? [ANSWER]: ViewChild/ViewChildren or ContentChild/ContentChildren
  • What is the difference between ViewChild and ContentChild?
  • Whats the difference between NgModules and ES2015 Modules?
  • How do you lazy load components and why is lazy loading important?
  • Explain Observables and why they are useful.
@codediodeio
codediodeio / content-box.component.html
Created August 5, 2017 18:00
Animate a div based on scroll position Angular 4.3
<div class="box" [@scrollAnimation]="state">
<img src="https://images.pexels.com/photos/37547/suit-business-man-business-man-37547.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb">
</div>
@codediodeio
codediodeio / index.html
Created September 25, 2018 03:07
How Pick a Random YouTube Comment https://youtu.be/_dvQpqoJkc4
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.0/lodash.min.js"></script>
<style>
body {
text-align: center;
display: flex;
@jdjuan
jdjuan / meta-regimen.md
Last active June 15, 2018 22:32
Meta Regimen: How to stick to your habits

Meta Regimen

Lessons I've learned throughout the years to keep up with my habits.

1. Motivate Yourself 💪

Nothing will make you skip your habits more than the lack of motivation

  • Believe you can
  • Watch motivational videos
@codediodeio
codediodeio / search-ui.component.html
Last active May 12, 2018 23:41
Algolia instantsearch.js Angular 4
<div id="search-box">
<!-- SearchBox widget will appear here -->
</div>
<div id="stats">
<!-- stats widget will appear here -->
</div>
<div id="hits">
<!-- Hits widget will appear here -->
</div>
<div id="pagination">
@nclarx
nclarx / your-component.component.ts
Created September 28, 2017 11:16
Example of Subscribe to Property
import {Component, OnDestroy, OnInit} from '@angular/core';
import {User} from './user'; // Assuming you have a class for user =====
import {Subscription} from 'rxjs/Subscription';
import {AngularFireDatabase, FirebaseListObservable, FirebaseObjectObservable} from 'angularfire2/database';
@Component({
selector: 'your-component',
template: `
<h1>{{ (user | async)?.name }}</h1>
<h1>{{ (user | async)?.price }}</h1>