Skip to content

Instantly share code, notes, and snippets.

Rafi mh-rafi

Block or report user

Report or block mh-rafi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ui-lib-products.json
[{
"name": "Done! Open Source Design System",
"url": "https://ui-lib.com/downloads/done-design-system/",
"photo": "https://ui-lib.com/wp-content/uploads/2019/06/done-banner.png"
}, {
"name": "NG Soon Angular Material Free Coming soon template",
"url": "https://ui-lib.com/downloads/ng-soon-angular-material-free-coming-soon-template/",
"photo": "https://ui-lib.com/wp-content/uploads/edd/2018/11/ng-soon-thumbnail.jpg"
}, {
"name": "Egret HTML5 Free Landing Page",
@mh-rafi
mh-rafi / _color-opacity-classes.scss
Last active May 4, 2019
SASS generate color opacity map
View _color-opacity-classes.scss
@import "color-opacity-map";
/*
This will generate classes for all colors
=========================================
.yellow-100 {background-color: #fefce2}
...
.yellow-900 {background-color: #464102}
View breadcrumb.component.ts
export class BreadcrumbComponent implements OnInit {
routeParts:any[];
constructor(
private router: Router,
private routePartsService: RoutePartsService,
private activeRoute: ActivatedRoute
) {
this.router.events.filter(event => event instanceof NavigationEnd).subscribe((routeChange) => {
this.routeParts = this.routePartsService.generateRouteParts(this.activeRoute.snapshot);
// generate url from parts
View book.breadcrumb.routing.ts
export const BookRoutes: Routes = [
{
path: '',
component: AuthorsComponent
},
{
path: ':author',
component: BookListComponent,
data: { title: 'List', breadcrumb: '{{author}}' },
children: [
View angular-route-parts.service.ts
interface IRoutePart {
title: string,
breadcrumb: string,
params?: Params,
url: string,
urlSegments: any[]
}
@Injectable()
export class RoutePartsService {
You can’t perform that action at this time.