Free Code Camp Project - Wikipedia Viewer App
This is an Angular2 app, generated by angular-cli. There is also an Angular1.x version which resides on CodePen
This project does not contain back-end code. It is just an Angular app
-
src folder
- index.html is the entry point. It contains our selector for the root component
- polyfills.ts contains the importing statements of es6 modules
- main.ts imports our module and components, also bootstraps the AppModule
-
src/app folder
- app.module.ts declares our AppModule that also imports the needed Angular Modules and our root component. There is only the root component used in the app.
- app.service.ts is an Angular service,decorated as
@Injectable()
it makes http requests to Wikipedia Api and returns the resulting data - app.component.ts is our root component file, decorated with
@NgComponent()
, it imports the AppService and uses to it to make http requests - rxjs-extensions.ts imports es6 rxjs modules. In AppService we use observables to return our data, and these modules are required to use the observable data
- app.component.html and app.component.css is our template and style files that'll be embed on the index.html file
- Wikipedia api used to search for articles by title, navigate user to random articles on Wikipedia website etc.