Skip to content

Commit

Permalink
doc(demo): implement <ngis-instantsearch>
Browse files Browse the repository at this point in the history
  • Loading branch information
iam4x committed Oct 16, 2017
1 parent 8539fb4 commit 4219df2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
13 changes: 11 additions & 2 deletions examples/demo/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import { Component } from "@angular/core";
import { NgISInstance } from "angular-instantsearch";

@Component({
selector: "ngis-app",
template: `
<h1>YOLO</h1>
<ngis-instantsearch [config]="config">
<h1>Angular InstantSearch demo</h1>
</ngis-instantsearch>
`
})
export class AppComponent {}
export class AppComponent {
public config = {
apiKey: "6be0576ff61c053d5f9a3225e2a90f76",
appId: "latency",
indexName: "instant_search"
};
}
3 changes: 2 additions & 1 deletion examples/demo/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { AppComponent } from "./app.component";
@NgModule({
bootstrap: [AppComponent],
declarations: [AppComponent],
imports: [BrowserModule, NgISModule.forRoot()]
imports: [BrowserModule, NgISModule.forRoot()],
providers: []
})
export class NgApp {}
3 changes: 2 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"tslint-plugin-prettier"
],
"rules": {
"prettier": true
"prettier": true,
"no-submodule-imports": false
}
}
3 changes: 1 addition & 2 deletions webpack.demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ var path = require('path');
var webpack = require('webpack');

var CommonsChunkPlugin = webpack.optimize.CommonsChunkPlugin;
var autoprefixer = require('autoprefixer');
var HtmlWebpackPlugin = require('html-webpack-plugin');

var ENV = process.env.MODE;
Expand Down Expand Up @@ -97,7 +96,7 @@ module.exports = {
// Workaround to remove Webpack warning in system_js_ng_module_factory_loader.js
// See https://github.com/angular/angular/issues/11580
new webpack.ContextReplacementPlugin(
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
/angular(\\|\/)core(\\|\/)@angular/,
root('examples', 'demo', 'app')
)
],
Expand Down

0 comments on commit 4219df2

Please sign in to comment.