当前位置: 首页 > 软件库 > Web应用开发 > Web框架 >

angular9-example-app

授权协议 MIT License
开发语言 JavaScript
所属分类 Web应用开发、 Web框架
软件类型 开源软件
地区 不详
投 递 者 卫诚
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Angular Example App

Example app with Angular 9 + Angular CLI + Angular Universal + i18n + Firebase

�� �� �� �� �� �� �� ��

Base project made with much ❤️ . Contains CRUD, patterns, generated library, and much more!

Demo example

Report bug · Request feature

Table of contents

Status

What's included

  • CRUD: create, update and remove heroes with Firebase
  • Angular Universal (SSR)
  • Use of StateTransferModule to share state between browser and server
  • Security Headers using helmet.
  • Internationalization with the official i18n. Separated builds for english and spanish.
  • Lazy loading modules
  • Service Workers enabled!
  • More logical directory structure (fromhere)
  • Basic example library
  • Following the best practices!
  • Search bar, to look for heroes
  • Custom loading page
  • Example of Angular Resolver for Hero Detail
  • Lazy loading images with ng-lazyload-image
  • Modal and toasts (snakbar)!
  • Scroll restoration and anchor examples
  • Responsive layout (flex layout module)
  • SASS (most common used functions and mixins) and BEM styles
  • Animations with ng-animate
  • Angular Pipes
  • Interceptors and Events (Progress bar active, if a request is pending)
  • Scroll to first invalid input in forms.(ngx-scroll-to-first-invalid)
  • Modernizr (browser features detection)
  • Browser filter (Bowser) because of IE ^^
  • Sentry! (logs every error in the app)
  • Google Tag Manager
  • ES6 Promises and Observables
  • Unit tests with Jasmine and Karma including code coverage. Use ofng-bullet,karma-mocha-reporter andng-mocks
  • End-to-end tests with Protractor, (moving to Cypress)

Angular Universal and i18n

This project is using firebase and Angular Universal with the official internationalization. You cannavigate through every language and reload (and share) every page in the application without losingcontext. This is very useful for SEO purposes and you almost have a ready for production app. If youwant to translate the messages you can use this awesome tool,Tiny Translator or followthis tutorial.

I've created a medium post where you can find a tutorial to apply this concepts to your own project.Check it here,and let me know what do you think.

Firebase

This repo is using Firebase. We use Cloud Firestore and Cloud Storage to handle CRUD operations overthe heroes and to store their images.

Travis CI

We use Travis CI to run this tasks in order:

  • Linter
  • Unit tests
  • End to end tests
  • Build for production of browser and server
  • Validate that server generated using curl
  • Sonar scanner

Quick start

WARNING

Verify that you are running node 12.4.0 by running node -v in a terminal/console window. Olderversions produce errors, but newer versions are fine.

npm i
npm start
Tasks Description
npm start Start the app in development mode with the english language only
npm start:es Start the app in development mode with the spanish language only
dev:ssr Start the server like SSR
extract-i18n Extract all messages from templates and ts files and update the language files with new translations
npm run lint Run the linter (tslint)
npm run test Run all unit tests with karma and jasmine
npm run test:app:watch Run app unit tests and wait for changes
npm run test:library:watch Run library unit tests and wait for changes
npm run e2e Run end to end tests with protractor
npm run build:prod Build the app for production with english translations
npm run build:prod:es Build the app for production with spanish translations
npm run builds:prod Builds both configurations
npm run build:ssr:prod Builds the server with universal in SSR mode
npm run serve:ssr Start the node server for angular universal
npm run build:library Build the library
npm run bundle-report Build and run webpack-bundle-analyzer over stats json
npm run release:minor Create a new minor release using standard-version
npm run release:major Create a new major release using standard-version
npm run ci Execute linter, tests and production builds

Bugs and feature requests

Have a bug or a feature request? Please first read theissue guidelinesand search for existing and closed issues. If your problem or idea is not addressed yet,please open a new issue.

Contributing

Please read through ourcontributing guidelines.Included are directions for opening issues, coding standards, and notes on development.

Moreover, all HTML and CSS should conform to the Code Guide,maintained by Ismael Ramos.

Editor preferences are available in theeditor config foreasy use in common text editors. Read more and download plugins at https://editorconfig.org/.

Creators

Ismael Ramos

Thanks

Thanks to all contributors and their support.

If you have an idea or you want to do something, tell me or just do it! I'm always happy to hearyour feedback!

Copyright and license

Code and documentation copyright 2020 the authors. Code released under theMIT License.

Enjoy ��

  • 5.1作用域 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>作用域</title> </head> <body ng-app="App" ng-init="name='康熙'"> <div class="box" ng-controller="ParentController">

  • Directives are decorated classes  A directive is a decorator -- @Directive() Angular templates are dynamic. When Angular renders them, it transforms the DOM according to the instructions given by dire

  • 什么是Angular-Ui-Router 它是Angular第三方开发用于管理ui与路由的模块,功能比Angular原生的ngRoute要强而且全,因此原生基本已经被其替代。 UI-Router是采用的是一种状态管理机制,“状态”可以继承,“状态”不禁包含url,还有views,controller等,以此来组织路由和控制界面UI的渲染,而不是单纯的改变路由。对于UI方面提供嵌套视图,可以一个页面

 相关资料
  • This repository is for version 2.x of the example application. Click here for the latest version (4.x) @ngrx example application Example application utilizing @ngrx libraries, showcasing common patter

  • 描述 (Description) Foundation通过使用由Motion UI库创建的过渡类来提供过渡效果。 例子 (Example) 以下示例演示了在Foundation中使用transitions - <!doctype html> <head> <meta charset = "utf-8" /> <meta http-equiv = "x-ua-compa

  • 企业应用开发示例 对于我们的教程,我们将实施化学设备和加工公司的CRM应用程序。 该公司涉及供应商并提供服务。 我们将在整个教程中编写与此示例相关的小代码片段,以详细了解每个概念。 要执行本教程中的代码,您需要创建两个对象:Customer和Invoice对象。 如果您已经知道如何在Salesforce中创建这些对象,则可以跳过下面给出的步骤。 否则,您可以按照下面的分步指南进行操作。 创建客户对

  • 描述: 提供一个如何使用描述项的例子。 Overview(概述) 提供一个如何使用描述项的例子。跟随此标签的文字将显示为高亮代码。 Examples(例子) 注意,一个doclet中可以同时使用多个@example标签。 例如,描述多个示例: /** * Solves equations of the form a * x = b * @example * // returns 2 * g

  • The node.js example app The node.js example app teaches the very basics of how to work with Contentful: consume content from the Contentful Delivery and Preview APIs model content edit content through

  • nemo-example-app 是一个用于 node.js web 应用的 Nemo 自动化实例。