Skip to content

Update Angular and React-Redux templates #17153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
////#if (IndividualLocalAuth)
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
////#else
import { HttpClientModule } from '@angular/common/http';
////#endif
import { RouterModule } from '@angular/router';

import { AppComponent } from './app.component';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CounterComponent } from './counter.component';

describe('CounterComponent', () => {
let component: CounterComponent;
let fixture: ComponentFixture<CounterComponent>;

beforeEach(async(() => {
Expand All @@ -15,7 +14,6 @@ describe('CounterComponent', () => {

beforeEach(() => {
fixture = TestBed.createComponent(CounterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

declare const require: any;
declare const require;

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
}
},
"plugins": [
"@typescript-eslint"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ class FetchData extends React.PureComponent<WeatherForecastProps> {
export default connect(
(state: ApplicationState) => state.weatherForecasts, // Selects which state properties are merged into the component's props
WeatherForecastsStore.actionCreators // Selects which action creators are merged into the component's props
)(FetchData as any);
)(FetchData as any); // eslint-disable-line @typescript-eslint/no-explicit-any
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Home = () => (
<li><a href='https://facebook.github.io/react/'>React</a> and <a href='https://redux.js.org/'>Redux</a> for client-side code</li>
<li><a href='http://getbootstrap.com/'>Bootstrap</a> for layout and styling</li>
</ul>
<p>To help you get started, we've also set up:</p>
<p>To help you get started, we have also set up:</p>
<ul>
<li><strong>Client-side navigation</strong>. For example, click <em>Counter</em> then <em>Back</em> to return here.</li>
<li><strong>Development server integration</strong>. In development mode, the development server from <code>create-react-app</code> runs in the background automatically, so your client-side resources are dynamically built on demand and the page refreshes when you modify any file.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ import * as React from 'react';
import { Container } from 'reactstrap';
import NavMenu from './NavMenu';

export default (props: { children?: React.ReactNode }) => (
<React.Fragment>
<NavMenu/>
<Container>
{props.children}
</Container>
</React.Fragment>
);
export default class Layout extends React.PureComponent<{}, { children?: React.ReactNode }> {
public render() {
return (
<React.Fragment>
<NavMenu />
<Container>
{this.props.children}
</Container>
</React.Fragment>
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function configureStore(history: History, initialState?: Applicat
});

const enhancers = [];
const windowIfDefined = typeof window === 'undefined' ? null : window as any;
const windowIfDefined = typeof window === 'undefined' ? null : window as any; // eslint-disable-line @typescript-eslint/no-explicit-any
if (windowIfDefined && windowIfDefined.__REDUX_DEVTOOLS_EXTENSION__) {
enhancers.push(windowIfDefined.__REDUX_DEVTOOLS_EXTENSION__());
}
Expand Down