This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Other content ---> | |
<fieldType name="case_insensitive_string" class="solr.TextField" positionIncrementGap="100"> | |
<analyzer type="index"> | |
<tokenizer class="solr.KeywordTokenizerFactory"/> | |
<filter class="solr.ASCIIFoldingFilterFactory"/> | |
<filter class="solr.TrimFilterFactory"/> | |
<filter class="solr.LowerCaseFilterFactory"/> | |
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/> | |
</analyzer> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {NgModule} from '@angular/core'; | |
import {HomeComponent} from './home/home.component'; | |
import {AboutUsComponent} from './about-us/about-us.component'; | |
import {ContactComponent} from './contact/contact.component'; | |
export class DependencyInjectionClass { | |
constructor(private _service: FictionalService) {} | |
resolve(route, state) { | |
//Get some fictional data with the id that's in the URL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {NgModule} from '@angular/core'; | |
import {HomeComponent} from './home/home.component'; | |
import {AboutUsComponent} from './about-us/about-us.component'; | |
import {ContactComponent} from './contact/contact.component'; | |
import {UIRouterUpgradeModule} from "@uirouter/angular-hybrid"; | |
export const StaticPagesRoutes = { | |
states: [ | |
{ | |
name: 'home', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {BrowserModule} from '@angular/platform-browser'; | |
import {NgModule} from '@angular/core'; | |
import {UpgradeModule} from '@angular/upgrade/static'; | |
import {AppComponent} from './app.component'; | |
import {UIRouterUpgradeModule} from "@uirouter/angular-hybrid"; | |
@NgModule({ | |
declarations: [ | |
AppComponent | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component, OnInit} from '@angular/core'; | |
import {NgRedux, select} from "@angular-redux/store"; | |
import {IAppState} from "./path/to/state"; | |
@Component({ | |
selector: 'app-any', | |
templateUrl: './any.component.html', | |
styleUrls: ['./any.component.scss'] | |
}) | |
export class AnyComponent implements OnInit { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as angular from 'angular'; | |
import ngRedux from 'ng-redux'; | |
import {ADD_LANGUAGE} from "../../../app/redux/actions"; | |
angular.module("any.module", [ngRedux]) | |
.run(['$ngRedux', $ngRedux => { | |
let language = { | |
shortcode: 'en', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {ILanguage} from "./languages"; | |
export interface IAppState { | |
languages: ILanguage[]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {IAppState} from "../interfaces/state"; | |
export const INITIAL_STATE: IAppState = { | |
languages: [] | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {createStore} from 'redux'; | |
import {rootReducer} from "./reducers"; | |
import {INITIAL_STATE} from "./reducers/initial-state"; | |
export const store = createStore(rootReducer, INITIAL_STATE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {ADD_LANGUAGE} from "../actions"; | |
import {INITIAL_STATE} from "./initial-state"; | |
import {ILanguage} from "../interfaces/languages"; | |
export function languages(state = INITIAL_STATE.languages, action):ILanguage[] { | |
switch (action.type) { | |
case ADD_LANGUAGE: | |
return state.concat(Object.assign({}, action.language)); | |
} |