This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class UsersService { | |
constructor() { } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { User } from '../models/user'; | |
@Injectable({ | |
providedIn: 'root', | |
}) | |
export class UsersService { | |
/** | |
* LISTA DE USUARIOS | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'example' | |
}) | |
export class ExamplePipe implements PipeTransform { | |
transform(value: unknown, ...args: unknown[]): unknown { | |
return null; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { Routes, RouterModule } from '@angular/router'; | |
import { AboutUsComponent } from './pages/about-us/about-us.component'; | |
import { HomePageComponent } from './pages/home-page/home-page.component'; | |
import { PostsPageComponent } from './pages/posts-page/posts-page.component'; | |
const routes: Routes = [ | |
{ path: '', component: HomePageComponent }, | |
{ path: 'about', component: AboutUsComponent }, | |
{ path: 'posts', component: PostsPageComponent }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="todo-list"> | |
<div *ngFor="let todo of todos"> | |
<app-todo-item | |
[id]="todo.id" | |
[title]="todo.title" | |
[description]="todo.description" | |
(onClick)="clickMarkAsDone(todo.id)" | |
> | |
</app-todo-item> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: 'app-todo-list', | |
templateUrl: './todo-list.component.html', | |
styleUrls: ['./todo-list.component.scss'] | |
}) | |
export class TodoListComponent implements OnInit { | |
todos: todo[] = DEMO_TODOS; | |
constructor() { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="todo-item"> | |
<span>{{ title }}</span> | |
<span>{{ description }}</span> | |
<button | |
(click)="click($event)" | |
> | |
Mark as done | |
</button> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: 'app-todo-item', | |
templateUrl: './todo-item.component.html', | |
styleUrls: ['./todo-item.component.scss'] | |
}) | |
export class TodoItemComponent implements OnInit { | |
@Input() id: Number; | |
@Input() title: String; | |
@Input() description: String; | |
@Input() done: Boolean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { motion, AnimatePresence } from 'framer-motion'; | |
import useOutsideClick from '../../hooks/useOutsideClick'; | |
interface ModalProps { | |
children?: React.ReactNode; | |
isOpen: boolean; | |
setOpen: React.Dispatch<React.SetStateAction<boolean>>; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2021-09-17T16:12:47.022Z","extensionVersion":"v3.4.3"} |