Skip to content

Instantly share code, notes, and snippets.

View adrianlemess's full-sized avatar

adrianlemess adrianlemess

View GitHub Profile
{
"age": {
"title": "Age",
"type": "number",
"min": 0,
"max": 120,
"validations": {
"required": "Age must be filled",
"min":"Age should not be less than 0",
"max":"Age should not be more than 120"
@adrianlemess
adrianlemess / after-app.module.ts
Last active May 21, 2020 17:10
Form output code
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { NgxMaskModule } from 'ngx-mask';
import { AppComponent } from './app.component';
import { SharedModule } from './shared/shared.module';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { PersonalInformationFormComponent } from './personal-information/personal-information-form.component';
@NgModule({
declarations: [AppComponent, PersonalInformationFormComponent],
export function forms(_options: OptionsFormSchema): Rule {
return (tree: Tree, _context: SchematicContext) => {
// Log
// context.logger.info('Info message');
// context.logger.warn('Warn message');
// context.logger.error('Error message');
const workspaceConfig = tree.read('/angular.json');
if (!workspaceConfig) {
throw new NotValidAngularWorkspace();
{
"type": "object",
"title": "Personal Informations",
"properties": {
"name": {
"title": "Name",
"type": "string",
"maxLength": 80
},
"password": {
@Component({
selector: 'app-home',
template: `
<h2>All Lessons</h2>
<h4>Total Lessons: {{lessons?.length}}</h4>
<div class="lessons-list-container v-h-center-block-parent">
<table class="table lessons-list card card-strong">
<tbody>
<tr *ngFor="let lesson of lessons" (click)="selectLesson(lesson)">
<td class="lesson-title"> {{lesson.description}} </td>
## Métodos Auxiliares para Array
### Exercicio 1
ltere o código a seguir para utilizar o método `forEach` de modo que a saída permaneça a mesma.
```
var numeros = [0,1,2,3,4,5];
for(var i = 0; i<= numeros.length; i++) {
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Questão XX - lista X</title>
</head>
<body>
<script>
/*Enunciado da questão.*/
<title>Questão 11</title> <script> /*Enunciado da questão.*/
1) Crie uma classe Produto com os seguintes atributos:
qtdEstoque
nome
tamanho
cor
preco
e com os seguintes métodos:
@adrianlemess
adrianlemess / markdown
Created November 15, 2019 15:37
react-awesome-list
https://pomb.us/build-your-own-react/