Giter Site home page Giter Site logo

greencityclient's Introduction

GreenCityClient HitCount

This project was generated with Angular CLI version 8.2.1.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running unit tests with code coverage

Run ng test --codeCoverage to execute the unit tests via Karma and to display test coverage via karma-coverage-istanbul-reporter. After passing all tests run cd coverage/GreenCityClient/ && start index.html for Windows or cd coverage/GreenCityClient/ && open index.html for MacOS

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

How to connect with front-end if some issues

  1. Run ng version and npm -v in the console. You must have the following versions to work correctly: Angular CLI: 9.1.15 Node: 14.20.1 npm: 6.14.15

In most cases reinstalling the Node is enough. Use this link to install Node v.14.20.1 (https://nodejs.org/en/blog/release/v14.20.1) before that, uninstall your installed version.

If the problem persists, try to install npm:6.14.15 at this link (https://www.npmjs.com/package/npm/v/6.14.15).

You should install Angular CLI 9.1.15 writting this in console: npm install -g @angular/[email protected]

Running json-server

1.npm i -g json-server (https://www.npmjs.com/package/json-server); 2. in first thred use command : json-server src\assets\all-json\eco-news.json; 3.in second thred use command: ng serve;

Project structure

  1. /e2e/ directory: e2e stands for end-to-end and it refers to e2e tests of the website. It contains testing scenarios (scripts) which simulate user behavior. We can simulate a user who visits a website, signs in, navigates to another site, fills the form and logs out.

  2. /node_modules/ All 3rd party libraries are installed into this folder when you run npm install. Those libraries are bundled into our application. What is important to know is that you shouldn't include this folder when deploying your application to production or committing to the git repository. If you move your project to a new location you should skip this folder and run npm install in a new location.

  3. /src/ This is where we keep our application source code.

    • /app/ This folder contains templates, styles, images, angular components and anything else In angular project inside src folder. Any files outside of this folder are meant to support building your app.

      /app/component/
          This folder contains all components
      
      /app/component/shared/components/
          This folder contains all shared components, which we use
      
      /app/component/layout/
          The layout directory contains one or more components which act as a layout or are parts of a layout such as a Header, Nav, Footer
      
      /app/component/directives/
          This folder contains all custom directives
      
      /app/model/
          This folder contains all models(classes, interfaces)
      
      /app/pipe/
          This folder contains all custom pipes
      
      /app/service/
          This folder contains all services
      
      /app/app-routing.module.ts
          This file contains class AppRoutingModule and all routes of the main page
      
    • /assets/ This folder contains static assets for our app like images, icons, styles.

    • /environments/ This folder contains two files, each for different environments. You will use this file to store environment specific configuration like database credentials or server addresses. By default there are two files, one for production and on for development.

    • favicon.ico The favicon of our app.

    • index.html This is is a very simple HTML file. If you open it you will note that there are no references to any stylesheet (CSS) nor JS files. This is because all dependencies are injected during the build process.

    • main.ts This is the starting point for our app. If you ever coded in languages like Java or C you can compare it to a main() method. If you haven't, then just remember that our application starts to execute from this place. This is where we are bootstrapping our first and only module — AppModule.

    • polyfils.ts Polyfils files are used for the compiler to compile our Typescript to specific JavaScript methods which can be parsed by different browsers.

    • styles.scss This is global stylesheet file that is by default, included to our project. Keep in mind that each component has its own style component which applies styles only within the scope of given component.

    • test.ts This is a configuration file for Karma. Karma is a testing tool shipped along with Angular, we will cover it one of the later lessons.

  4. .gitignore This file instructs git which files should be ignored when working with git repository.

  5. karma.conf.js Another configuration file for Karma. We will cover that in the future.

  6. package.json This file is mandatory for every npm project. It contains basic information regarding our project (name, description, license etc.) commands which can be used, dependencies — those are packages required by our application to work correctly, and devDepndencies — again a list of packages which are required for our application however only during the development phase. I.e. we need Angular CLI only during development to build a final package however on production we don't need it anymore.

  7. README.md File containing a description of our project. All the information which we would like to provide our userswith before they start using our app.

  8. tsconfig.json A bunch of compiler settings. Based on these settings, it will compile code to JS code which that browser can understand.

  9. tsconfig.{app|spec}.json TypeScript compiler configuration for the Angular app (tsconfig.app.json) and for the unit tests (tsconfig.spec.json).

  10. tslint.json TSlint is a useful static analysis tool that checks our TypeScript code for readability, maintainability, and functionality errors. This file contains its configuration. We will see how it works in a future lesson.

Modules:

app.module.ts - The root module of the application
eco-news.module.ts - Eco News module
about.module.ts
auth.module.ts
comments.module.ts
core.module.ts
modal.module.ts
eco-news-routing.module.ts
home.module.ts
layout.module.ts
map-routing.module.ts
shared.module.ts
user-routing.module.ts

Services:

language.service.ts
change-password.service.ts
profile.service.ts
comments.service.ts
create-eco-news.service.ts
search.service.ts
place.service.ts
favorite-place.service.ts
news.service.ts
interceptor.service.ts
edit-profile.service.ts
eco-news.service.ts
local-storage.service.ts
all-habits.service.ts
title-and-meta-tags.service.ts
user.service.ts
ui-actions.service.ts
auth-page-guard.service.ts
filter-place.service.ts
feedback.service.ts
user-own-sign-up.service.ts
user-own-sign-in.service.ts
user-own-auth.service.ts
restore-password.service.ts
language.service.ts
modal.service.ts
confirmation-dialog-service.service.ts
weekDaysUtils.service.ts
subscription.service.ts
specification.service.ts
home-page-guard.service.ts
jwt.service.ts
habit-statistic.service.ts
habit-fact.service.ts
comment.service.ts
category.service.ts
google-sign-in.service.ts
advice.service.ts
achievement.service.ts

greencityclient's People

Contributors

atsa21 avatar dimoybiyca avatar flash5482 avatar gusvarov avatar hnativlyubomyr avatar hryshkoanton avatar iamlanar avatar jimholman1199 avatar katia9261 avatar khrystynapr avatar kimat25 avatar kkatiaa avatar mplesha avatar mr-pavlenko avatar nabermi2020 avatar nadiiastoiko avatar nazardobriy avatar newartmask avatar nvolodymyr avatar oksanafilipchuk avatar romandeveloperacc avatar s1auka avatar shyraidan avatar skrebetsnataliia avatar sobkiv avatar sokhataras avatar taraskuzma1999 avatar yulkats avatar yura935 avatar zaitsev-oleksii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

greencityclient's Issues

How to merge CreenCityChat

  1. Update the app.
  2. Create localizations.
  3. Change links in enviroment.ts
  4. Activate skipped tests (they check azure's links so I skipped they)

[Habits] The habit add button should not be active when re-selecting a habit from the list of habit templates

Environment: Linux Ubuntu 20.04, Chrome Version 88.0.4324.150 (Official Build) (64-bit).
Reproducible: always.
Build found: 15.02.21

Steps to reproduce:
1 Sign in with User on-page https://ita-social-projects.github.io/GreenCityClient/
2 Open habits tab

Actual result
1 If you have a list of pre-selected habits, some of tham can be repeated.
2 Select "Add new habit"
3 On the page with habits templates. Those habits that used have an active button "Add habit"

h3
h2
Expected result

1 If you have a list of pre-selected habits, none of them should be repeated.
2 On the page with habits templates. Those habits that used to be should not have an active button "Add habit"

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.