Giter VIP home page Giter VIP logo

angularmaterial's Introduction

AngularMaterial 🕹

Estructura básica angularAngular Material Mobileandroide36 App with descargaCapacitor

URL

  • Angular
https://angular.io/start
  • Angular Material
https://material.angular.io/
  • schematics
https://material.angular.io/guide/schematics
  • Capactor
https://capacitorjs.com/

Creo el nuevo proyecto scss:

ng new AngularMaterial --routing --style=scss
cd .\AngularMaterial\
ng add @angular/material
- Would you like to proceed? (Y/n)yes
> Purple/Green       [ Preview: https://material.angular.io?theme=purple-green ]
 Set up global Angular Material typography styles? Yes
Include the Angular animations module? yes
  • Levantar app
 ng serve -o
  • App navigator
ng g @angular/material:navigation app-navigation
  • Vamos a src\app\app.component.html
  • Borramos todos y añadimos el componente navigator:
<app-app-navigation></app-app-navigation>
  • Crear componente
ng g component about
  • crear dashboard (Panel)
ng g @angular/material:dashboard panel

Creo las Path en app-routing.module.ts

const routes: Routes = [
  {
    path: '',
    children: [
      {
        path: '',
        component: PanelComponent
      },
      {
        path: 'about',
        component: AboutComponent
      },
      {
        path: '404',
        component: ErrorComponent
      },
      {
        path: '**',
        redirectTo: '404',
      }
    ]
  }
];

Para añadir el panel o DAshboard al pg de inicio \app-navigation\app-navigation.component.html

  <router-outlet></router-outlet>

Antes de añdir Capacitor hago build

ng build

Instalar Capacitor

 npm install @capacitor/cli --save-dev
 npx cap init

Para instalar ios/android

npm install @capacitor/ios @capacitor/android
npx cap add android
npx cap add ios
  • 👀Error❗❗ [error] The web assets directory (.\dist) must con......
    [error] Error: ENOENT: no such file or director.........
  • Ir capacitor.config.ts
const config: CapacitorConfig = {
❗❗donde esta el dist:
 ❌ webDir: 'dist',
 
};
const config: CapacitorConfig = {
❗❗donde esta el dist PONER el nombre del proyecto como vien en el dist:
 ✔ webDir: 'dist/angular-material',
};

  • Ir a terminal y tirar este comando
 npx cap sync
 ng build && npx cap copy
  • Si no levanta la app👀
npm uninstall -g @capacitor/cli
npm install -g @capacitor/cli
npx cap remove android
(si no puedes quitarla del archivo)
npx cap add android
npx cap open android

angularmaterial's People

Contributors

cintutudev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.