Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
feat(templates): Use searchClient in Angular (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour authored Jul 9, 2018
1 parent 33e646c commit 6b6cb2f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scripts/__snapshots__/e2e-templates.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ describe('AppComponent', () => {
exports[`Templates Angular InstantSearch File content: src/app/app.component.ts 1`] = `
"import { Component } from '@angular/core';
import * as algoliasearch from \\"algoliasearch\\";
@Component({
selector: 'app-root',
Expand All @@ -386,9 +387,8 @@ exports[`Templates Angular InstantSearch File content: src/app/app.component.ts
})
export class AppComponent {
config = {
appId: 'appId',
apiKey: 'apiKey',
indexName: 'indexName',
searchClient: algoliasearch('appId', 'apiKey'),
};
}"
`;
Expand Down
3 changes: 2 additions & 1 deletion src/templates/Angular InstantSearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@angular/platform-browser": "6.0.7",
"@angular/platform-browser-dynamic": "6.0.7",
"@angular/router": "6.0.7",
"algoliasearch": "3.29.0",
"angular-instantsearch": "{{libraryVersion}}",
"core-js": "2.5.7",
"rxjs": "6.2.1",
Expand All @@ -28,7 +29,7 @@
"devDependencies": {
"@angular/compiler-cli": "6.0.7",
"@angular-devkit/build-angular": "0.6.8",
"typescript": "2.9.2",
"typescript": "2.7.2",
"@angular/cli": "6.0.8",
"@angular/language-service": "6.0.7",
"@types/jasmine": "2.8.8",
Expand Down
4 changes: 2 additions & 2 deletions src/templates/Angular InstantSearch/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component } from '@angular/core';
import * as algoliasearch from "algoliasearch";

@Component({
selector: 'app-root',
Expand All @@ -7,8 +8,7 @@ import { Component } from '@angular/core';
})
export class AppComponent {
config = {
appId: '{{appId}}',
apiKey: '{{apiKey}}',
indexName: '{{indexName}}',
searchClient: algoliasearch('{{appId}}', '{{apiKey}}'),
};
}

0 comments on commit 6b6cb2f

Please sign in to comment.