-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAyudas_ANGULAR.txt
112 lines (72 loc) · 2.15 KB
/
Ayudas_ANGULAR.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
ng serve
npm --version
ng version
//crear archivo
ng new xxx
//iniciar server
ng serve
//Librerias
npm i @popperjs/core
npm i --save jquery
npm i --save popper.js
npm i --save angular-popper
npm i --save bootstrap
npm i --save @fortawesome/fontawesome-free
//instalar todas las librerias
npm i --save @popperjs/core jquery popper.js angular-popper bootstrap @fortawesome/fontawesome-free ngx-bootstrap ngx-toastr ngx-pagination ngx-bootstrap ngx-toastr
npm i --save ngx-pagination
npm i --save ngx-bootstrap
npm i --save ngx-toastr
ng g s : generar servicio
para encodear:
npm i js-sha512
desencodear
npm i jet-decode
guardian
ng g guard nombre : evitar intrusos
//Crear componentes
ng g c nombre
//IMPORTAR LIBRERIAS
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.css",
"node_modules/@fortawesome/fontawesome-free/css/all.css",
"node_modules/ngx-toastr/toastr.css",
"src/styles.css"
],
"scripts": [
"./node_modules/jquery/dist/jquery.js",
"./node_modules/@popperjs/core/dist/umd/popper.js",
"./node_modules/bootstrap/dist/js/bootstrap.js"
]
//metodo : void {}(void es para no retornar )
//app.module
import {FormsModule} from '@angular/forms'
//carpeta mocks
independisa todo lo de la data(backend)
//mooks=archivos de prueba
app.nodules.ts
--- MODULE ----
import { FormsModule } from '@angular/forms';
import { ToastrModule } from 'ngx-toastr';
import { ModalModule } from 'ngx-bootstrap/modal';
import { NgxPaginationModule } from 'ngx-pagination';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
imports: [
FormsModule,
ToastrModule.forRoot(),
ModalModule.forRoot(),
BrowserAnimationsModule,
NgxPaginationModule,
AppRoutingModule
],
--crear pipes--
ng g p nombre
--crear modelos--
ng g cl nombre
--Ruteo--
poner ruta por defecto
{path:'',redirectTo:'/inicio',pathMatch:'full'}
ruta no encontrada
{path:'**',component:NoEncontradoComponent}
poner ruta por defecto
{path:'',redirectTo:'/inicio',pathMatch:'full'}