Git Product home page Git Product logo

tomastrajan / angular-ngrx-material-starter Goto Github PK

View Code? Open in Web Editor NEW
2.8K 158.0 916.0 20.77 MB

Angular, NgRx, Angular CLI & Angular Material Starter Project

Home Page: https://tomastrajan.github.io/angular-ngrx-material-starter

License: MIT License

Shell 0.46% TypeScript 68.35% JavaScript 1.56% HTML 21.42% SCSS 8.20%
angular ngrx angular-material angular-cli bootstrap4 starter-project lazy-loading material-design

angular-ngrx-material-starter's Introduction

Angular 12, NgRx and Angular Material Starter

by @tomastrajan

Buy Me A Coffee

license All Contributors code style: prettier Build Status Codecov Twitter Follow

intro themes

Table of Content

Getting started

git clone https://github.com/tomastrajan/angular-ngrx-material-starter.git new-project
cd new-project
npm install
npm start

Useful Commands

  • npm start - starts a dev server and opens browser with running app
  • npm run start:prod - runs full prod build and serves prod bundle
  • npm run test - runs lint and tests
  • npm run e2e - runs end-to-end tests
  • npm run watch - runs tests in watch mode
  • npm run format:write - runs prettier to format whole code base (.ts and .scss)
  • npm run analyze - runs full prod build and webpack-bundle-analyzer to visualize how much code is shipped (dependencies & application)

analzye

Make It Your Own

When using this starter project to build your own app you might consider some of the following steps:

  • use search and replace functionality of your favourite IDE to replace anms with <your-app-prefix>
  • rename project in package.json name property and set appropriate version (eg 0.0.0 or 1.0.0)
  • remove / rename context path config -- --deploy-url /angular-ngrx-material-starter/ --base-href /angular-ngrx-material-starter in package.json, this is used to configure url (context path) on which the application will be available (eg. https://www.something.com/<context-path>/)
  • rename app in /environments/ files (will be shown in browser tab)
  • delete pre-existing CHANGELOG.md (you will generate your own with future releases of your features)
  • delete CODE_OF_CONDUCT.md, CONTRIBUTING.md and BUILT_WITH.md files as they are relevant only if project is open sourced on Github
  • edit the title and Open Graph metadata properties in index.html
  • remove or adjust links in the footer
  • replace logo in /assets folder ( currently 128 x 128 pixel png file )
  • adjust colors in /themes/default-theme.scss
  • create a pull request in the original repository to update BUILT_WITH.md file with a link and short description of your project

Continuous Integration

Starter project is using Travis CI for running linters and tests on every commit. Based on your preferences and needs you can either:

  • not use / use other CI server and delete both .travis.yml and .travis-deploy.sh
  • create Travis CI account and link it to your projects Github repo and configure build with GH_REF and GH_TOKEN environment variables for automatic deployment of releases to Github Pages

Goals

The main goal of this repository is to provide an up to date example of Angular application following all recent best practices in various areas like:

  • @ngrx/store - including reducers, actions, selectors
  • @ngrx/effects - for implementation of side effects like http requests, logging, notifications,...
  • @ngrx/entity - for CRUD operations
  • @ngrx/router-store - to connect the Angular Router to @ngrx/store
  • @ngrx/store-devtools - to enable a powerful time-travelling debugger.
  • @angular/material - material design component library, theming, ...
  • routing
  • testing of all the above mentioned concepts
  • Angular CLI configuration (prod build, budgets, ...)

This repository will also strive to always stay in sync with releases of Angular and the related libraries. The nature of the repository is also a great match for first time open source contributors who can add simple features and enhance test coverage, all contributors are more than welcome!

Learning Materials

Articles with content that explains various approaches used to build this starter project.

Theming

Features

  • custom themes support (4 themes included)
  • lazy-loading of feature modules
  • lazy reducers
  • localStorage ui state persistence
  • @ngrx/effects for API requests
  • fully responsive design
  • angular-material and custom components in SharedModule

Stack

  • Angular
  • ngrx (or try ngx-model if you prefer less boilerplate)
  • Angular Material
  • Bootstrap 5 (only reset, utils and grids)

Troubleshooting

  • Blocking at emitting LicenseWebpackPlugin when npm start - try using cnpm instead of npm

Contributors

Want to start contributing to open source with Angular?

Leave your mark and join the growing team of contributors!

Get started by checking out list of open issues and reading Contributor Guide


Tomas Trajan

πŸ’» πŸ“– ⚠️ 🎨 πŸ“

Tim Deschryver

πŸ’» πŸ‘€ πŸ€” πŸ“–

Santosh Yadav

πŸ’» ⚠️

Moshe

πŸ’» ⚠️ πŸ›

hhubik

πŸ’» πŸ“–

Muhammad Umair

πŸ’»

Phil Merrell

πŸ’»

Valery Kharshats

πŸ’» πŸ›

Neil Pathare

πŸ“–

Peter Krieg

πŸ’» πŸ›

Alex

πŸ’» πŸ›

Fiona

πŸ’» 🌍

Fabien DehoprΓ©

πŸ’» 🌍

Matias Iglesias

πŸ’» 🌍

Jeremy Kairis

πŸ’» πŸ›

Iago Andrade

πŸ’» 🌍

aideslucas

πŸ’» 🌍 πŸ›

Terry Strachan

πŸ’» ⚠️

Laurentiu Amagdei

πŸ’» ⚠️

Petar Djordjevic

πŸ’»

Zachary DeRose

πŸ’» ⚠️

erhise

πŸ’» ⚠️

Joost ZΓΆllner

πŸ’» ⚠️

Tomasz Kula

πŸ’» ⚠️ πŸ›

Front-End Developer

πŸ’» πŸ›

Vishal Sodani

πŸ’» πŸ”§

Kosmas SchΓΌtz

πŸ’» 🌍

huyen1990

⚠️

Chau (Joe) Nguyen

πŸ’» ⚠️

Amadou Sall

πŸ’»

Dino

πŸ”§

Mathias DΓΈhl

πŸ’»

Carl in 't Veld

πŸ’» πŸ›

Abed Zantout

πŸ’»

Peng Wang

πŸ’» 🌍

Ray

πŸ’‘ πŸ“–

alharto

πŸ’» πŸ›

roniaxe

πŸ’» 🌍

MilΓ‘n Tenk

πŸ“–

Kadar Hamza

πŸ’»

Zakir

πŸ’» πŸ›‘οΈ

Siddharth

πŸ’» πŸ”§ πŸ”Œ

Stephen Legge

πŸ’» πŸ““

Tino GΓΆtz

πŸ’»

Dino

πŸ’»

Changyu Geng

πŸ’»

omaralharthy

πŸ’»

mcanoglu

πŸ’»

Dany Marques

πŸ’»

universaltutor5

πŸ’»

Dan Vargas

πŸ’»

MilΓ‘n Tenk

πŸ’»

Shady

πŸ’» 🌍

angular-ngrx-material-starter's People

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  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  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  avatar

Watchers

 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  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  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  avatar

angular-ngrx-material-starter's Issues

Really Cool

Not really an issue but I didn't see any licensing on the main page. I was assuming this is MIT but wasn't sure. Really like the big input component. Wanted to use it in a site I am making. Been reading your blog and watching your videos as well and just wanted to say thanks for teaching me Material!

Animations in Safari seam to flicker

Been testing this in multiple browsers including Safari, Edge and IE11.

Safari:
The animations in Safari seam to flicker.

Edge: The animations in Edge seam to flicker.

IE11:
As it is does not run. IE11 does not support "includes" method in Strings. As a result its crashes. Use "indexOf" instead.

Got some errors and debugging messages after git clone of this project

ngrx material starter error output

after git clone of this project

the project will not be running

here the output of chrome debugging

[DEBUG] action: @ngrx/store/init {payload: undefined, oldState: undefined, newState: {…}}
debug.reducer.ts:6 [DEBUG] action: @ngrx/store/update-reducers {payload: undefined, oldState: {…}, newState: {…}}
debug.reducer.ts:6 [DEBUG] action: @ngrx/effects/init {payload: undefined, oldState: {…}, newState: {…}}
core.es5.js:168 Could not find HammerJS. Certain Angular Material components may not work correctly.
push../node_modules/@angular/material/esm5/core.es5.js.MatCommonModule._checkHammerIsAvailable @ core.es5.js:168

EDIT: removed unnecessary long stacktrace

pug support

Hi guys, somebody knows how to avaible the pug/jade templating support?

Regards.

theme not loaded after page refresh in development mode

Hi,

after selecting e.g. the LIGHT-THEME on your published website the theme gets restored when refreshing the page. That is what is expected...

When cloning your rep the theme gets not restored in development mode after refreshing the page with F5.

I tried debugging for quite a while but couldn't find any solution.
Do you have a fix for that?

Thanks,
Daniel

Fix stock market example [Good for first time contributors]

The stock market example was getting data from google finance API which seems to be discontinued. We have to find another free source of simple stock prices to consume and use it in stock-market.service.ts.

Based on the shape of retrieved data (JSON), additional adjustments to map functions might be needed.

Original Google finance API url: https://finance.google.com/finance?output=json&q=NYSE:

Tips for first time contributors:

  1. Create fork of the repository
  2. Create fix commit in format fix(examples): fix stock market API source or something similar
  3. Create pull request (Github) should offer that option automatically once the fix branch was pushed

ng generate not working

I'm trying to run angular cli commands like ng generate component hello and it changes nothing.

Is there a simple example that mimics communication between sibling components?

Hi Hackers!

In order to make sense of the communication between components, I am looking for a simple example, one that mimics the old and problematic emit and broadcast communication but this time using ngrx.

For example:

On click event Component 1 sends an ID Param to the method of another component => Component 2, so Component 2 re-loads a listing table based on the ID Param previously sent by Component 1.

Thanks a bunch!

Dark Blue Color as Forecolor on Active Drop Down Items

After your latest changes of making the default themes always included the forecolor of Active drop down items in Dark Theme is a dark blue color. You can see this if you go to change the settings and your theme is currently the Dark theme.

problem with background class in about page

Hi,
Nice template. Found an issue tho with the about.component.scss .background &::before class.
If you maximize the window - the mountains picture is displayed properly. When you make the browser much smaller, the problem happens when you scroll down in the menu. The toolbar and footer are fixed, but the image is set to a fixed size as well. See screenshots:
about - in maximized window
about - in browser window shrinked - scrollbar on top
about - in browser window shrinked - scrollbar moved a little down

At this stage I am not sure how to fix it. I tested couple of ideas, but no solution yet. Potentially, another div which will cover the resizing, or changing the background & &behind classes?

Regards,
Kuba

Login ?

I do not understand one thing only, the login and logout does not work or is it only inlustrative? how would it look for a login before the main screen?

usually I do this:

const routes: Routes = [ { path: '', component: ReadmePageComponent }, { path: 'login', component: UserLoginComponent }, { path: 'items', component: ItemsListComponent, canActivate: [AuthGuard] }, { path: 'notes', component: NotesListComponent, canActivate: [AuthGuard] }, // uploads are lazy loaded { path: 'uploads', loadChildren: './uploads/shared/upload.module#UploadModule', canActivate: [AuthGuard] }, ];

auth.guard.ts

`import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';

import { AngularFireAuth } from 'angularfire2/auth';
import { AuthService} from './auth.service';
import { NotifyService } from './notify.service';

import { Observable } from 'rxjs/Observable';
import { map, take, tap } from 'rxjs/operators';

@Injectable()
export class AuthGuard implements CanActivate {
constructor(private auth: AuthService, private router: Router, private notify: NotifyService) {}

canActivate(
next: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable | boolean {

return this.auth.user.pipe(
  take(1),
  map((user) => !!user),
  tap((loggedIn) => {
    if (!loggedIn) {
      console.log('access denied');
      this.notify.update('You must be logged in!', 'error');
      this.router.navigate(['/login']);
    }
  }),
);

}
}
`

auth.service.ts

`import { Injectable } from '@angular/core';
import { Router } from '@angular/router';

import * as firebase from 'firebase/app';
import { AngularFireAuth } from 'angularfire2/auth';
import { AngularFirestore, AngularFirestoreDocument } from 'angularfire2/firestore';
import { NotifyService } from './notify.service';

import { Observable } from 'rxjs/Observable';
import { switchMap } from 'rxjs/operators';

interface User {
uid: string;
email?: string | null;
photoURL?: string;
displayName?: string;
}

@Injectable()
export class AuthService {

user: Observable<User | null>;

constructor(private afAuth: AngularFireAuth,
private afs: AngularFirestore,
private router: Router,
private notify: NotifyService) {

this.user = this.afAuth.authState
  .switchMap((user) => {
    if (user) {
      return this.afs.doc<User>(`users/${user.uid}`).valueChanges();
    } else {
      return Observable.of(null);
    }
  });

}

////// OAuth Methods /////

googleLogin() {
const provider = new firebase.auth.GoogleAuthProvider();
return this.oAuthLogin(provider);
}

githubLogin() {
const provider = new firebase.auth.GithubAuthProvider();
return this.oAuthLogin(provider);
}

facebookLogin() {
const provider = new firebase.auth.FacebookAuthProvider();
return this.oAuthLogin(provider);
}

twitterLogin() {
const provider = new firebase.auth.TwitterAuthProvider();
return this.oAuthLogin(provider);
}

private oAuthLogin(provider: firebase.auth.AuthProvider) {
return this.afAuth.auth.signInWithPopup(provider)
.then((credential) => {
this.notify.update('Welcome to Firestarter!!!', 'success');
return this.updateUserData(credential.user);
})
.catch((error) => this.handleError(error) );
}

//// Anonymous Auth ////

anonymousLogin() {
return this.afAuth.auth.signInAnonymously()
.then((user) => {
this.notify.update('Welcome to Firestarter!!!', 'success');
return this.updateUserData(user); // if using firestore
})
.catch((error) => {
console.error(error.code);
console.error(error.message);
this.handleError(error);
});
}

//// Email/Password Auth ////

emailSignUp(email: string, password: string) {
return this.afAuth.auth.createUserWithEmailAndPassword(email, password)
.then((user) => {
this.notify.update('Welcome to Firestarter!!!', 'success');
return this.updateUserData(user); // if using firestore
})
.catch((error) => this.handleError(error) );
}

emailLogin(email: string, password: string) {
return this.afAuth.auth.signInWithEmailAndPassword(email, password)
.then((user) => {
this.notify.update('Welcome to Firestarter!!!', 'success')
return this.updateUserData(user); // if using firestore
})
.catch((error) => this.handleError(error) );
}

// Sends email allowing user to reset password
resetPassword(email: string) {
const fbAuth = firebase.auth();

return fbAuth.sendPasswordResetEmail(email)
  .then(() => this.notify.update('Password update email sent', 'info'))
  .catch((error) => this.handleError(error));

}

signOut() {
this.afAuth.auth.signOut().then(() => {
this.router.navigate(['/']);
});
}

// If error, console log and notify user
private handleError(error: Error) {
console.error(error);
this.notify.update(error.message, 'error');
}

// Sets user data to firestore after succesful login
private updateUserData(user: User) {

const userRef: AngularFirestoreDocument<User> = this.afs.doc(`users/${user.uid}`);

const data: User = {
  uid: user.uid,
  email: user.email || null,
  displayName: user.displayName || 'nameless user',
  photoURL: user.photoURL || 'https://goo.gl/Fz9nrQ',
};
return userRef.set(data);

}
}
`

In your project I do not know how it would look, thank you for sharing your great project, I'll use it as a basis for my next project.
Thank you again !

Google Analytics Pageview Tracking

Thanks for the wonderful work on this starter. We have forked it to use as a base at my institution and it has saved us a lot of time.

I noticed that you embedded the Google Analytics tracking code in the starter app, which is great, but due to the nature of single page applications, it is only tracking the initial load of index.html. In order to track each page view you must subscribe to the NavigationEnd router event and manually push each pageview to Google Analytics.

I'm creating a PR to primarily address the pageview issue, however, there is quite a lot going on in the ngOnInit method in app.component.ts, so I refactored for clarity and readability. If there is a particular style or refinement you'd like in the PR, I'd be happy to oblige.

showing 2 vertical scrollbars when viewing the page in IE 11

Hi All,

I am seeing 2 vertical scrollbars along with horizontal scrollbar when viewing the page in IE v11.2189

Seems like the horizontal scrollbar is appearing because of the 2 vertical scrollbars taking up some extra space. Everything is working perfectly in Chrome browser though.
2 vertical scrollbars issue in ie 11

Thanks,
Pramod

Create unit tests for settings component

Create unit test for settings component that covers its functionality.

Please follow testing pattern introduced in todos.component.spec.ts or please suggest improvements in the comments.

TESTS (rough idea, please add /adjust / improve where makes sense):

should dispatch change theme action on theme selection
should dispatch change auto night mode on night mode toggle
should dispatch change animations page ...
should dispatch change animations elements ...
should disable change animations page when disabled is set in state
...

Feel free to check out Contributors Guide for useful tips and hints that help you get started.

[Feature Request] Using ngrx/entity

It would be great to add the new ngrx/entity feature and provide an example. So we can follow the latest update provided by ngrx. :)

Over all, this is a really good starter. :)

Sidenav Not Showing

Looking at the code there is a sidenav with ngFor anchors but when the app is run the sidenav is nowhere to be seen. Is this a feature of the app? If so, what's the rational behind it? Thanks

matInput colors for Dark Theme are incorrect

The matInput colors for Dark theme are not right, they show up as black when focused. I dug around and wasn't 100% clear on how this should be fixed properly. It looks like setting the 900 on mat-palette($mat-grey, 900...) in the first parameter is responsible. But if you change that it also changes the navbar, etc.

I was able to override these settings in styles.reset.scss-theme.scss with the following:

 .mat-focused {
    .mat-form-field-label {
      color: mat-color($accent, lighter) !important;
    }

    .mat-form-field-ripple {
      background-color: mat-color($accent, lighter);
    }
  }

But that seems kind of like a hack and not proper. I also didn't fix the cursor color in that fix, just the ripple, and the field label. For a proper fix you would also want to address the cursor color.

Create new "form" example

The starter project contains lazy loaded examples module which currently contains following examples:

  • todos
  • stock market
  • theming
  • auth only route

Create new example demonstrating "real life" complex reactive form using a form builder.

  • should live in examples/form route
  • should have dedicated component, reducer (effects if needed)

Form should have following features:

  • record to be edited (eg user record with edit, save, reset button)
  • use various input types (eg input, dropdown, slider, toggle)
  • use unified "real life" like content (eg pizza creator, user editor, order creation or similar)
  • use form validation with validation messages (eg required, email, more than ...)
  • reset button ( to clear form to original state )
    ...

Please feel free to suggest, enhance or improve anything!

Feel free to check out Contributors Guide for useful tips and hints that help you get started.

Why not OnPush change detection in BigInputActionComponent?

Thanks for making this starter project!!

I am wondering though why none of the components use OnPush change detection. I am under the impression that one of the benefits of using "dumb" components that only receive input data and/or produce output data was that their performance could be improved by using the OnPush change detection.

It seems that at the very least BigInputActionComponent and perhaps AboutComponent should use OnPush change detection. Any thoughts on this?

Create unit tests for stock-market component.

Create unit test for stock market component that covers its functionality.

Please follow testing pattern introduced in todos.component.spec.ts or please suggest improvements in the comments.

TESTS (rough idea, please adjust / improve where makes sense):

should show spinner if stocks are loading
should hide spinner if stocks are loaded
should show error on retrieve stocks error
should display stock (name, price, change, exchange)
should dispatch retrieve action on symbol input change
...

Feel free to check out Contributors Guide for useful tips and hints that help you get started.

Implement Typed Actions

Instead of overriding the Action interface for @ngrx its a ver nice development experience having typed actions with models for the payload, with intellisense.

Embed a material core theme in styles.scss to remove warn "Could not find Angular Material core theme."

Hi Tomas,

I have had this message: Could not find Angular Material core theme. in my dev log.
I could solve it by adding
@import "../node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css";
after line 11 in styles.scss:

...
@import '../node_modules/@angular/material/theming';

@import "../node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css";

@include mat-core();
...

Regards

Jan

Angular 6.0.0-beta7 can't be installed

During npm install I have problem with angular 6.0.0-beta7 because it references github:webpack-contrib/html-webpack-plugin which doesn't exist anymore. I tried to update to 6.0.0-rc.2, but got another issue with Local workspace file ('angular.json') could not be found.

Can you please help me?

Improve / add more unit tests

Currently repository contains only test stubs generated by Angular CLI (for the corresponding components and services).

These test stubs contains only necessary imports so that the basic expect(component).toBeTruthy(); style test passes.

We need to improve tests to serve as a example for the users of this repository.

  • suggest best test practices
  • standardized imports for test related stuff
  • add unit tests for the component / service functionality
  • use community driven test library? (optional)

Tests can be added in step by step fashion with one PR corresponding to the tests of one component / service to keep the required effort low but please feel free to add more ;)

ps: please use commit message in format like feat(examples): add tests, #<issue-number>, just replace examples with applicable application part.

snack-bar

I'm trying to extend a notification system using a snack bar on your project, but without success, do you have any tips?

import { MatExpansionModule } from '@angular/material/expansion'; import { MatSnackBarModule } from '@angular/material/snack-bar';

openSnackBar() { this.snackBar.openFromComponent(AppComponent, { duration: 900, }); }

<button mat-button (click)="openSnackBar()" aria-label="Show an example snack-bar"> Button </button>

Theme scss file paths in styles.scss are missing parent folder

Hi Tomas,

take a look on the import statements for your themes in styles.scss.
They are missing the parent folder "themes".
It should look like this:

@import 'themes/default-theme.scss';
@import 'themes/light-theme.scss';
@import 'themes/black-theme.scss';
@import 'themes/nature-theme.scss';

Although it worked before, my IDE PhpStorm stopped complaining about these lines after the change.

Jan

PS: Nice project.

[Feature request] Universal support.

As a AngularCli added support for Universal app angular-ngrx-material-starter should have option to be build with support for Angular Universal to achieve better seo.

[Suggestion] Provide sample integration with firestore

I want to suggest providing some sample integration with firestore + ngrx, maybe on some branch. I think it's quite popular BaaS and some people will try to use it, especially for some MVP concepts. And from what I see integrating this with ngrx is not very trivial so this would help a lot to see your sample implementation :)

Property 'themeClass' does not exist on type 'OverlayContainer'.

I am currently getting the following error when running npm start: ERROR in C:/Users/....../angular-ngrx-material/src/app/app.component.ts (52,31): Property 'themeClass' does not exist on type 'OverlayContainer'.

As per the recent Angular Material changelog available here https://github.com/angular/material2/blob/master/CHANGELOG.md#200-beta11-carapace-parapet-2017-09-21

overlay: Now that the Overlay is part of the cdk rather than Angular Material directly, the themeClass property has been removed. To add a class to the overlay for theming, you can do

overlayContainer.getContainerElement().classList.add('my-theme-class');

Can you please help me with this issue. I think replacing this.overlayContainer.themeClass = theme; inside the app.component.ts with the above code will resolve the issue but I am afraid it may break other things in the App. Thanks in advance.

Why barrel files?

Barrel files are no longer recommended by the Angular team:

Barrels now [after introduction of ngModules] are far less useful and have been removed from the [Angular] style guide

angular-ngrx-material-starter/src/app/core/index.ts
angular-ngrx-material-starter/src/app/shared/index.ts

In my experience, barrel files can lead to problems due to circular dependencies. Any thoughts on that?

Improve / add more e2e test

This repository currently runs single e2e test as a part of it's CI (continuous integration) build on Travis CI. Test can also be executed using npm run e2e.

It would be great to provide more e2e test examples for the users of this repository to serve as a great example for how to write their own tests.

  • best practices for angular e2e testing ( eg: separate tests and page objects ... )
  • more e2e test (mostly for the examples functionality) like add todo, toggle todo, ...
  • suggest / evaluate / use community driven e2e test library for angular

Tests can be added in step by step fashion with one PR corresponding to the tests of one route / page to keep the required effort low but please feel free to add more ;)

ps: please use commit message in format like feat(e2e): add tests, #, just replace test description with stuff like "todos" based on applicable route / page.

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.