├── .gitignore ├── LICENSE ├── README.md ├── angular-bootstrap ├── .angular-cli.json ├── .gitignore ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.ts │ │ └── app.module.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── tsconfig.app.json │ └── typings.d.ts └── tsconfig.json ├── angular-components ├── .angular-cli.json ├── .gitignore ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── content │ │ │ ├── content.component.ts │ │ │ └── content.html │ │ ├── footer │ │ │ ├── footer.component.ts │ │ │ └── footer.html │ │ ├── header │ │ │ ├── header.component.ts │ │ │ └── header.html │ │ ├── root.html │ │ └── sidebar │ │ │ ├── sidebar.component.ts │ │ │ └── sidebar.html │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── tsconfig.app.json │ └── typings.d.ts └── tsconfig.json ├── angular-data-binding ├── .angular-cli.json ├── .gitignore ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.html │ │ ├── app.component.ts │ │ └── app.module.ts │ ├── assets │ │ ├── .gitkeep │ │ ├── angular.png │ │ └── utad.png │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── tsconfig.app.json │ └── typings.d.ts └── tsconfig.json ├── angular-dependency-injection ├── .angular-cli.json ├── .gitignore ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.html │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ └── books.service.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── tsconfig.app.json │ └── typings.d.ts └── tsconfig.json ├── angular-directives ├── .angular-cli.json ├── .gitignore ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── for │ │ │ ├── for.component.ts │ │ │ └── for.html │ │ ├── if │ │ │ ├── if.component.ts │ │ │ └── if.html │ │ └── switch │ │ │ ├── switch.component.ts │ │ │ ├── switch.css │ │ │ └── switch.html │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── tsconfig.app.json │ └── typings.d.ts └── tsconfig.json ├── angular-hello-world-minimal ├── .angular-cli.json ├── .gitignore ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.ts │ │ └── app.module.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── tsconfig.app.json │ └── typings.d.ts └── tsconfig.json ├── angular-hello-world ├── .angular-cli.json ├── .editorconfig ├── .gitignore ├── README.md ├── e2e │ ├── app.e2e-spec.ts │ ├── app.po.ts │ └── tsconfig.e2e.json ├── karma.conf.js ├── package-lock.json ├── package.json ├── protractor.conf.js ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ └── app.module.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── typings.d.ts ├── tsconfig.json └── tslint.json ├── angular-heroku ├── .angular-cli.json ├── .gitignore ├── Procfile ├── app.js ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.ts │ │ └── app.module.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── tsconfig.app.json │ └── typings.d.ts └── tsconfig.json ├── angular-material ├── .angular-cli.json ├── .gitignore ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.html │ │ ├── app.component.ts │ │ └── app.module.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── tsconfig.app.json │ └── typings.d.ts └── tsconfig.json ├── angular-primeng ├── .angular-cli.json ├── .gitignore ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.html │ │ ├── app.component.ts │ │ └── app.module.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── tsconfig.app.json │ └── typings.d.ts └── tsconfig.json ├── angular-rest-services ├── .angular-cli.json ├── .gitignore ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.html │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ └── books.service.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── tsconfig.app.json │ └── typings.d.ts └── tsconfig.json ├── angular-routing ├── .angular-cli.json ├── .gitignore ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── app.routing.ts │ │ ├── book-detail.component.ts │ │ ├── book-list.component.ts │ │ └── book.service.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── tsconfig.app.json │ └── typings.d.ts └── tsconfig.json ├── bootstrap ├── block-buttons.html ├── breadcrums.html ├── buttons.html ├── cinqueterre.jpg ├── forms-validation.html ├── forms.html ├── grid1.html ├── grid2.html ├── grid3.html ├── grid4.html ├── headlines.html ├── image-responsive.html ├── images.html ├── img_chania.jpg ├── img_chania2.jpg ├── img_flower.jpg ├── img_flower2.jpg ├── list.html ├── menu.html ├── moustiers-sainte-marie.jpg ├── nav1.html ├── nav2.html ├── nav3.html ├── page1.html ├── page2.html ├── pager1.html ├── pager2.html ├── progress.html ├── pulpitrock.jpg ├── tables.html └── text.html ├── css ├── background1.html ├── background2.html ├── button.css ├── button.html ├── color.html ├── css1.html ├── css2.html ├── css3.html ├── css3.png ├── divs1.html ├── divs2.html ├── dropdown.css ├── dropdown.html ├── font.html ├── gradient_bg.png ├── layout1.css ├── layout1.html ├── layout2.css ├── layout2.html ├── links.html ├── nesting.css ├── nesting.sass ├── nesting.scss ├── outline.html ├── overflow.html ├── rules.html ├── sansation_light.woff ├── styles.css ├── text1.html └── text2.html ├── ecmascript6 ├── class.html ├── const1.html ├── const2.html ├── const3.html ├── fat-arrow-syntax.html ├── for-of.html ├── let.html ├── map.html ├── multiline-strings.html ├── promises.html └── set.html ├── heroku-spring-boot-postgresql ├── Procfile ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── heroku │ │ ├── Customer.java │ │ ├── CustomerRepository.java │ │ ├── DatabaseLoader.java │ │ └── MySpringBootApp.java │ └── resources │ ├── application.properties │ └── static │ └── index.html ├── html ├── basic.html ├── form.html ├── frameset.html ├── headings.html ├── hello.html ├── iframe.html ├── image.html ├── lists.html ├── table.html └── text.html ├── ionic-hello-world ├── .editorconfig ├── .gitignore ├── config.xml ├── ionic.config.json ├── package-lock.json ├── package.json ├── resources │ ├── README.md │ ├── android │ │ ├── icon │ │ │ ├── drawable-hdpi-icon.png │ │ │ ├── drawable-ldpi-icon.png │ │ │ ├── drawable-mdpi-icon.png │ │ │ ├── drawable-xhdpi-icon.png │ │ │ ├── drawable-xxhdpi-icon.png │ │ │ └── drawable-xxxhdpi-icon.png │ │ └── splash │ │ │ ├── drawable-land-hdpi-screen.png │ │ │ ├── drawable-land-ldpi-screen.png │ │ │ ├── drawable-land-mdpi-screen.png │ │ │ ├── drawable-land-xhdpi-screen.png │ │ │ ├── drawable-land-xxhdpi-screen.png │ │ │ ├── drawable-land-xxxhdpi-screen.png │ │ │ ├── drawable-port-hdpi-screen.png │ │ │ ├── drawable-port-ldpi-screen.png │ │ │ ├── drawable-port-mdpi-screen.png │ │ │ ├── drawable-port-xhdpi-screen.png │ │ │ ├── drawable-port-xxhdpi-screen.png │ │ │ └── drawable-port-xxxhdpi-screen.png │ ├── icon.png │ ├── ios │ │ ├── icon │ │ │ ├── icon-1024.png │ │ │ ├── icon-40.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-40@3x.png │ │ │ ├── icon-50.png │ │ │ ├── icon-50@2x.png │ │ │ ├── icon-60.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-72.png │ │ │ ├── icon-72@2x.png │ │ │ ├── icon-76.png │ │ │ ├── icon-76@2x.png │ │ │ ├── icon-83.5@2x.png │ │ │ ├── icon-small.png │ │ │ ├── icon-small@2x.png │ │ │ ├── icon-small@3x.png │ │ │ ├── icon.png │ │ │ └── icon@2x.png │ │ └── splash │ │ │ ├── Default-568h@2x~iphone.png │ │ │ ├── Default-667h.png │ │ │ ├── Default-736h.png │ │ │ ├── Default-Landscape-736h.png │ │ │ ├── Default-Landscape@2x~ipad.png │ │ │ ├── Default-Landscape@~ipadpro.png │ │ │ ├── Default-Landscape~ipad.png │ │ │ └── Default-Portrait@2x~ipad.png │ └── splash.png ├── src │ ├── app │ │ ├── app.component.ts │ │ ├── app.html │ │ ├── app.module.ts │ │ ├── app.scss │ │ └── main.ts │ ├── assets │ │ ├── icon │ │ │ └── favicon.ico │ │ └── imgs │ │ │ └── logo.png │ ├── index.html │ ├── manifest.json │ ├── pages │ │ └── home │ │ │ ├── home.html │ │ │ ├── home.scss │ │ │ └── home.ts │ ├── service-worker.js │ └── theme │ │ └── variables.scss ├── tsconfig.json ├── tslint.json └── www │ └── index.html ├── ionic-tabs ├── .editorconfig ├── .gitignore ├── ionic.config.json ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.ts │ │ ├── app.html │ │ ├── app.module.ts │ │ ├── app.scss │ │ └── main.ts │ ├── assets │ │ ├── icon │ │ │ └── favicon.ico │ │ └── imgs │ │ │ └── logo.png │ ├── index.html │ ├── manifest.json │ ├── pages │ │ ├── about │ │ │ ├── about.html │ │ │ ├── about.scss │ │ │ └── about.ts │ │ ├── contact │ │ │ ├── contact.html │ │ │ ├── contact.scss │ │ │ └── contact.ts │ │ ├── home │ │ │ ├── home.html │ │ │ ├── home.scss │ │ │ └── home.ts │ │ └── tabs │ │ │ ├── tabs.html │ │ │ └── tabs.ts │ ├── service-worker.js │ └── theme │ │ └── variables.scss ├── tsconfig.json └── tslint.json ├── javascript ├── ajax.html ├── arrays.html ├── comparator.html ├── dom.html ├── exceptions.html ├── functions01.html ├── functions02.html ├── functions03.html ├── info.txt ├── js01.html ├── js02.html ├── js03.html ├── obj01.html ├── obj02.html ├── obj03.html ├── obj04.html ├── obj05.html ├── obj06.html ├── obj07.html ├── obj08.html ├── obj09.html ├── obj10.html ├── obj11.html ├── obj12.html ├── obj13.html ├── script.js ├── this.html └── validate-form.html ├── jdbc-mysql ├── pom.xml └── src │ └── main │ └── java │ └── io │ └── github │ └── web │ └── data │ └── mysql │ ├── MySqlJdbcCreateTable.java │ ├── MySqlJdbcInsert.java │ └── MySqlJdbcReadUpdateDelete.java ├── jquery ├── cookies.html ├── header.html ├── jquery01.html ├── jquery02.html ├── jquery03.html ├── jquery04.html ├── jquery05.html ├── jquery06.html ├── jquery07.html ├── jquery08.html ├── lore.html ├── site-content-page1.html ├── site-content-page2.html ├── site-layout.html ├── site-page1.html ├── site-page2.html ├── site.css └── w3jquery.gif ├── junit-selenium ├── pom.xml └── src │ └── test │ └── java │ └── io │ └── github │ └── web │ ├── junit │ ├── ArrayListTest.java │ └── JUnitTest.java │ └── selenium │ ├── ChromeTest.java │ └── FirefoxTest.java ├── mongodb ├── pom.xml └── src │ └── main │ └── java │ └── io │ └── github │ └── web │ └── data │ └── mongodb │ └── MongoDbExample.java ├── nodejs-hello-world ├── app.js ├── package-lock.json └── package.json ├── rest-webservices ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── rest │ │ ├── client │ │ ├── jackson │ │ │ └── JacksonClient.java │ │ ├── retrofit │ │ │ ├── RetrofitClient.java │ │ │ └── TeamsClient.java │ │ └── spring │ │ │ └── SpringRestClient.java │ │ └── service │ │ ├── MyRestController.java │ │ ├── MyService.java │ │ ├── MySpringBootApp.java │ │ ├── Player.java │ │ └── Team.java │ └── resources │ ├── logback.xml │ └── static │ ├── index.html │ ├── jquery-client-get.html │ └── jquery-client-post.html ├── spring-boot-hello-world ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── MySpringBootApp.java │ └── resources │ ├── application.properties │ ├── logback.xml │ └── static │ └── index.html ├── spring-data-h2 ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── data │ │ └── h2 │ │ ├── Customer.java │ │ ├── CustomerRepository.java │ │ ├── DatabaseLoader.java │ │ └── MySpringBootApp.java │ └── resources │ ├── application.properties │ └── logback.xml ├── spring-data-mongodb ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── data │ │ └── mongodb │ │ ├── Customer.java │ │ ├── CustomerRepository.java │ │ ├── DatabaseLoader.java │ │ └── MySpringBootApp.java │ └── resources │ ├── application.properties │ └── logback.xml ├── spring-data-mysql ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── data │ │ └── mysql │ │ ├── Customer.java │ │ ├── CustomerRepository.java │ │ ├── DatabaseLoader.java │ │ └── MySpringBootApp.java │ └── resources │ ├── application.properties │ └── logback.xml ├── spring-mvc-hello-world ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── springmvc │ │ ├── MyController.java │ │ └── MySpringBootApp.java │ └── resources │ ├── application.properties │ ├── logback.xml │ └── templates │ └── hello_world.html ├── spring-mvc-thymeleaf-basic ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── thymeleaf │ │ ├── ConditionalController.java │ │ ├── IterationController.java │ │ ├── LinkController.java │ │ ├── MyObject.java │ │ ├── MySpringBootApp.java │ │ └── TextController.java │ └── resources │ ├── application.properties │ ├── logback.xml │ └── templates │ ├── home_page.html │ ├── if_page.html │ ├── loop_page.html │ └── text_page.html ├── spring-mvc-thymeleaf-forms ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── thymeleaf │ │ ├── FormController.java │ │ ├── MyForm.java │ │ └── MySpringBootApp.java │ └── resources │ ├── application.properties │ ├── logback.xml │ └── templates │ ├── home_page.html │ └── result_page.html ├── spring-mvc-thymeleaf-i18n ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── i18n │ │ ├── MyController.java │ │ └── MySpringBootApp.java │ └── resources │ ├── messages_en.properties │ ├── messages_es.properties │ ├── messages_fr.properties │ └── templates │ └── i18n_page.html ├── spring-mvc-thymeleaf-layout ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── thymeleaf │ │ ├── MyController.java │ │ └── MySpringBootApp.java │ └── resources │ ├── application.properties │ ├── logback.xml │ └── templates │ ├── layout.html │ ├── page1.html │ └── page2.html ├── spring-mvc-thymeleaf-session ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── thymeleaf │ │ ├── MySpringBootApp.java │ │ ├── SessionController.java │ │ └── User.java │ └── resources │ ├── application.properties │ ├── logback.xml │ └── templates │ ├── data_session.html │ ├── home_page.html │ └── info_session.html ├── spring-security-aa-advanced ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── security │ │ ├── DatabaseLoader.java │ │ ├── MyAuthenticationProvider.java │ │ ├── MyController.java │ │ ├── MySecurityConfiguration.java │ │ ├── MySpringBootApp.java │ │ ├── User.java │ │ └── UserRepository.java │ └── resources │ ├── application.properties │ ├── logback.xml │ └── templates │ ├── home.html │ ├── index.html │ ├── login.html │ └── root.html ├── spring-security-aa-medium ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── security │ │ ├── MyController.java │ │ ├── MySecurityConfiguration.java │ │ └── MySpringBootApp.java │ └── resources │ ├── application.properties │ ├── logback.xml │ └── templates │ ├── home.html │ ├── index.html │ ├── login.html │ └── root.html ├── spring-security-aa-simple ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── security │ │ ├── MyController.java │ │ ├── MySecurityConfiguration.java │ │ └── MySpringBootApp.java │ └── resources │ ├── application.properties │ ├── logback.xml │ └── templates │ ├── home.html │ ├── index.html │ └── login.html ├── spring-security-https ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── github │ │ └── web │ │ └── security │ │ ├── MyController.java │ │ ├── MySecurityConfiguration.java │ │ └── MySpringBootApp.java │ └── resources │ ├── application.properties │ ├── keystore.jks │ ├── logback.xml │ └── templates │ ├── home.html │ ├── index.html │ └── login.html ├── spring-test ├── pom.xml └── src │ ├── main │ ├── java │ │ └── io │ │ │ └── github │ │ │ └── web │ │ │ └── springtest │ │ │ ├── MyComponent.java │ │ │ └── SpringTestDemoApp.java │ └── resources │ │ ├── logback.xml │ │ └── static │ │ ├── index.html │ │ └── other.html │ └── test │ └── java │ └── io │ └── github │ └── web │ └── springtest │ ├── SpringChromeJupiterTest.java │ └── SpringJupiterTest.java └── typescript ├── class1.ts ├── class2.ts ├── decorator.ts ├── export.ts ├── export2.ts ├── hello.ts ├── import.ts ├── import2.ts ├── interfaces.ts └── types.ts /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | target 3 | .classpath 4 | .project 5 | .settings 6 | .metadata 7 | node_modules/ -------------------------------------------------------------------------------- /angular-bootstrap/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # e2e 39 | /e2e/*.js 40 | /e2e/*.map 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | /bin/ 46 | -------------------------------------------------------------------------------- /angular-bootstrap/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | template: ` 6 |

Angular App with Bootstrap style

7 | 8 | `, 9 | styles: [] 10 | }) 11 | export class AppComponent { 12 | title = 'app'; 13 | } 14 | -------------------------------------------------------------------------------- /angular-bootstrap/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | 5 | import { AppComponent } from './app.component'; 6 | 7 | 8 | @NgModule({ 9 | declarations: [ 10 | AppComponent 11 | ], 12 | imports: [ 13 | BrowserModule 14 | ], 15 | providers: [], 16 | bootstrap: [AppComponent] 17 | }) 18 | export class AppModule { } 19 | -------------------------------------------------------------------------------- /angular-bootstrap/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-bootstrap/src/assets/.gitkeep -------------------------------------------------------------------------------- /angular-bootstrap/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular-bootstrap/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /angular-bootstrap/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularBootstrap 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /angular-bootstrap/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /angular-bootstrap/src/styles.css: -------------------------------------------------------------------------------- 1 | @import "~bootstrap/dist/css/bootstrap.css" -------------------------------------------------------------------------------- /angular-bootstrap/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /angular-bootstrap/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /angular-bootstrap/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-components/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # e2e 39 | /e2e/*.js 40 | /e2e/*.map 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /angular-components/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: 'root.html', 6 | styles: [] 7 | }) 8 | export class AppComponent { 9 | title = 'app'; 10 | } 11 | -------------------------------------------------------------------------------- /angular-components/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | 5 | import { AppComponent } from './app.component'; 6 | import { HeaderComponent } from './header/header.component'; 7 | import { SidebarComponent } from './sidebar/sidebar.component'; 8 | import { ContentComponent } from './content/content.component'; 9 | import { FooterComponent } from './footer/footer.component'; 10 | 11 | 12 | @NgModule({ 13 | declarations: [ 14 | AppComponent, 15 | HeaderComponent, 16 | SidebarComponent, 17 | ContentComponent, 18 | FooterComponent 19 | ], 20 | imports: [ 21 | BrowserModule 22 | ], 23 | providers: [], 24 | bootstrap: [AppComponent] 25 | }) 26 | export class AppModule { } 27 | -------------------------------------------------------------------------------- /angular-components/src/app/content/content.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-content', 5 | templateUrl: 'content.html', 6 | styles: [] 7 | }) 8 | export class ContentComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /angular-components/src/app/footer/footer.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-footer', 5 | templateUrl: 'footer.html', 6 | styles: [] 7 | }) 8 | export class FooterComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /angular-components/src/app/footer/footer.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /angular-components/src/app/header/header.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-header', 5 | templateUrl: 'header.html', 6 | styles: [] 7 | }) 8 | export class HeaderComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /angular-components/src/app/header/header.html: -------------------------------------------------------------------------------- 1 |
2 |

Header

3 |
4 | -------------------------------------------------------------------------------- /angular-components/src/app/root.html: -------------------------------------------------------------------------------- 1 |
2 | Loading... 3 | 4 |
5 | Loading... 6 | Loading... 7 |
8 | 9 | Loading... 10 |
11 | -------------------------------------------------------------------------------- /angular-components/src/app/sidebar/sidebar.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-sidebar', 5 | templateUrl: 'sidebar.html', 6 | styles: [] 7 | }) 8 | export class SidebarComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /angular-components/src/app/sidebar/sidebar.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /angular-components/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-components/src/assets/.gitkeep -------------------------------------------------------------------------------- /angular-components/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular-components/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /angular-components/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularComponents 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /angular-components/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /angular-components/src/styles.css: -------------------------------------------------------------------------------- 1 | .container { 2 | width: 900px; 3 | margin: 0 auto; 4 | } 5 | 6 | .header { 7 | float: left; 8 | width: 100%; 9 | background-color: black; 10 | color: white; 11 | text-align: center; 12 | } 13 | 14 | .content { 15 | float: left; 16 | width: 100%; 17 | position: relative; 18 | } 19 | 20 | .nav { 21 | width: 100px; 22 | position: absolute; 23 | top: 0; 24 | bottom: 0; 25 | left: 0; 26 | background-color: #eeeeee; 27 | } 28 | 29 | .main { 30 | margin-left: 100px; 31 | float: left; 32 | } 33 | 34 | .footer { 35 | clear: both; 36 | background-color: black; 37 | color: white; 38 | text-align: center; 39 | } 40 | -------------------------------------------------------------------------------- /angular-components/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /angular-components/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /angular-components/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-data-binding/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # e2e 39 | /e2e/*.js 40 | /e2e/*.map 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /angular-data-binding/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |

Hello {{name}}!

2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /angular-data-binding/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: 'app.component.html', 6 | styles: [] 7 | }) 8 | export class AppComponent { 9 | name = 'Anybody'; 10 | imgUrl = "assets/utad.png"; 11 | 12 | setName(name: string) { 13 | this.name = name; 14 | } 15 | 16 | changeUrl() { 17 | this.imgUrl = "assets/angular.png"; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-data-binding/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import {BrowserModule} from '@angular/platform-browser'; 2 | import {NgModule} from '@angular/core'; 3 | import {FormsModule} from '@angular/forms'; 4 | import {AppComponent} from './app.component'; 5 | 6 | @NgModule({ 7 | declarations: [ 8 | AppComponent 9 | ], 10 | imports: [ 11 | BrowserModule, FormsModule 12 | ], 13 | providers: [], 14 | bootstrap: [AppComponent] 15 | }) 16 | export class AppModule {} 17 | -------------------------------------------------------------------------------- /angular-data-binding/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-data-binding/src/assets/.gitkeep -------------------------------------------------------------------------------- /angular-data-binding/src/assets/angular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-data-binding/src/assets/angular.png -------------------------------------------------------------------------------- /angular-data-binding/src/assets/utad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-data-binding/src/assets/utad.png -------------------------------------------------------------------------------- /angular-data-binding/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular-data-binding/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /angular-data-binding/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularDataBinding 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /angular-data-binding/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /angular-data-binding/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /angular-data-binding/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /angular-data-binding/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /angular-data-binding/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-dependency-injection/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # e2e 39 | /e2e/*.js 40 | /e2e/*.map 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /angular-dependency-injection/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |

Search Books

2 | 3 | 4 | 5 |

6 | 7 | 8 | 9 |

{{book}}

-------------------------------------------------------------------------------- /angular-dependency-injection/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {BooksService} from './books.service'; 3 | 4 | @Component({ 5 | selector: 'app-root', 6 | templateUrl: 'app.component.html', 7 | styles: [] 8 | }) 9 | export class AppComponent { 10 | books: string[] = []; 11 | 12 | constructor(private booksService: BooksService) {} 13 | 14 | search(title: string) { 15 | this.books = this.booksService.getBooks(title); 16 | } 17 | 18 | list() { 19 | this.books = this.booksService.getAllBooks(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /angular-dependency-injection/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import {BrowserModule} from '@angular/platform-browser'; 2 | import {NgModule} from '@angular/core'; 3 | 4 | import {AppComponent} from './app.component'; 5 | import {BooksService} from './books.service'; 6 | 7 | @NgModule({ 8 | declarations: [ 9 | AppComponent 10 | ], 11 | imports: [ 12 | BrowserModule 13 | ], 14 | providers: [BooksService], 15 | bootstrap: [AppComponent] 16 | }) 17 | export class AppModule {} 18 | -------------------------------------------------------------------------------- /angular-dependency-injection/src/app/books.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | 3 | @Injectable() 4 | export class BooksService { 5 | 6 | private myBooks: string[] = ['Spring in Action', 'Java for Web Applications', 'Spring Boot Cookbook']; 7 | 8 | getBooks(key: string) { 9 | let out: string[] = []; 10 | for (let book of this.myBooks) { 11 | if (book.includes(key)) { 12 | out.push(book); 13 | } 14 | } 15 | return out; 16 | } 17 | 18 | getAllBooks() { 19 | return this.myBooks; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /angular-dependency-injection/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-dependency-injection/src/assets/.gitkeep -------------------------------------------------------------------------------- /angular-dependency-injection/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular-dependency-injection/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /angular-dependency-injection/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularDependencyInjection 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /angular-dependency-injection/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /angular-dependency-injection/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /angular-dependency-injection/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /angular-dependency-injection/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /angular-dependency-injection/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-directives/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # e2e 39 | /e2e/*.js 40 | /e2e/*.map 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /angular-directives/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | template: ` 6 | Loading... 7 | Loading... 8 | Loading... 9 | `, 10 | styles: [] 11 | }) 12 | export class AppComponent { 13 | title = 'app'; 14 | } 15 | -------------------------------------------------------------------------------- /angular-directives/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | 5 | import { AppComponent } from './app.component'; 6 | import { ForComponent } from './for/for.component'; 7 | import { IfComponent } from './if/if.component'; 8 | import { SwitchComponent } from './switch/switch.component'; 9 | 10 | 11 | @NgModule({ 12 | declarations: [ 13 | AppComponent, 14 | ForComponent, 15 | IfComponent, 16 | SwitchComponent 17 | ], 18 | imports: [ 19 | BrowserModule 20 | ], 21 | providers: [], 22 | bootstrap: [AppComponent] 23 | }) 24 | export class AppModule { } 25 | -------------------------------------------------------------------------------- /angular-directives/src/app/for/for.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-for', 5 | templateUrl: 'for.html', 6 | styles: [] 7 | }) 8 | export class ForComponent { 9 | 10 | people: any[] = [ 11 | { 12 | "name": "Douglas Pace" 13 | }, 14 | { 15 | "name": "Mcleod Mueller" 16 | }, 17 | { 18 | "name": "Day Meyers" 19 | }, 20 | { 21 | "name": "Aguirre Ellis" 22 | }, 23 | { 24 | "name": "Cook Tyson" 25 | } 26 | ]; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /angular-directives/src/app/for/for.html: -------------------------------------------------------------------------------- 1 |

NgFor example

2 | 7 | 8 |

NgFor example (with index)

9 | 14 | -------------------------------------------------------------------------------- /angular-directives/src/app/if/if.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-if', 5 | templateUrl: 'if.html', 6 | styles: [] 7 | }) 8 | export class IfComponent { 9 | 10 | people: any[] = [ 11 | { 12 | "name": "Douglas Pace", 13 | "age": 35 14 | }, 15 | { 16 | "name": "Mcleod Mueller", 17 | "age": 29 18 | }, 19 | { 20 | "name": "Day Meyers", 21 | "age": 21 22 | }, 23 | { 24 | "name": "Aguirre Ellis", 25 | "age": 34 26 | }, 27 | { 28 | "name": "Cook Tyson", 29 | "age": 32 30 | } 31 | ]; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /angular-directives/src/app/if/if.html: -------------------------------------------------------------------------------- 1 |

NgIf example

2 | 3 | 8 | -------------------------------------------------------------------------------- /angular-directives/src/app/switch/switch.css: -------------------------------------------------------------------------------- 1 | .primary { 2 | color: blue; 3 | } 4 | 5 | .success { 6 | color: green; 7 | } 8 | 9 | .warning { 10 | color: orange; 11 | } 12 | 13 | .danger { 14 | color: red; 15 | } -------------------------------------------------------------------------------- /angular-directives/src/app/switch/switch.html: -------------------------------------------------------------------------------- 1 |

NgSwitch example

2 | 10 | -------------------------------------------------------------------------------- /angular-directives/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-directives/src/assets/.gitkeep -------------------------------------------------------------------------------- /angular-directives/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular-directives/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /angular-directives/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularDirectives 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /angular-directives/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /angular-directives/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /angular-directives/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /angular-directives/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /angular-directives/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-hello-world-minimal/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # e2e 39 | /e2e/*.js 40 | /e2e/*.map 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /angular-hello-world-minimal/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | 5 | import { AppComponent } from './app.component'; 6 | 7 | 8 | @NgModule({ 9 | declarations: [ 10 | AppComponent 11 | ], 12 | imports: [ 13 | BrowserModule 14 | ], 15 | providers: [], 16 | bootstrap: [AppComponent] 17 | }) 18 | export class AppModule { } 19 | -------------------------------------------------------------------------------- /angular-hello-world-minimal/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-hello-world-minimal/src/assets/.gitkeep -------------------------------------------------------------------------------- /angular-hello-world-minimal/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular-hello-world-minimal/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /angular-hello-world-minimal/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularHelloWorldMinimal 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /angular-hello-world-minimal/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /angular-hello-world-minimal/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /angular-hello-world-minimal/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /angular-hello-world-minimal/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /angular-hello-world-minimal/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-hello-world/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /angular-hello-world/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # e2e 39 | /e2e/*.js 40 | /e2e/*.map 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /angular-hello-world/e2e/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('angular-hello-world App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getParagraphText()).toEqual('Welcome to app!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /angular-hello-world/e2e/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /angular-hello-world/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "baseUrl": "./", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": [ 9 | "jasmine", 10 | "jasminewd2", 11 | "node" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /angular-hello-world/src/app/app.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-hello-world/src/app/app.component.css -------------------------------------------------------------------------------- /angular-hello-world/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'app'; 10 | } 11 | -------------------------------------------------------------------------------- /angular-hello-world/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | 5 | import { AppComponent } from './app.component'; 6 | 7 | 8 | @NgModule({ 9 | declarations: [ 10 | AppComponent 11 | ], 12 | imports: [ 13 | BrowserModule 14 | ], 15 | providers: [], 16 | bootstrap: [AppComponent] 17 | }) 18 | export class AppModule { } 19 | -------------------------------------------------------------------------------- /angular-hello-world/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-hello-world/src/assets/.gitkeep -------------------------------------------------------------------------------- /angular-hello-world/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular-hello-world/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /angular-hello-world/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-hello-world/src/favicon.ico -------------------------------------------------------------------------------- /angular-hello-world/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularHelloWorld 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /angular-hello-world/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /angular-hello-world/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /angular-hello-world/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /angular-hello-world/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /angular-hello-world/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "baseUrl": "./", 6 | "module": "commonjs", 7 | "types": [ 8 | "jasmine", 9 | "node" 10 | ] 11 | }, 12 | "files": [ 13 | "test.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /angular-hello-world/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /angular-hello-world/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-heroku/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # e2e 39 | /e2e/*.js 40 | /e2e/*.map 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /angular-heroku/Procfile: -------------------------------------------------------------------------------- 1 | web: node app.js -------------------------------------------------------------------------------- /angular-heroku/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var http = require('http'); 3 | var path = require('path'); 4 | 5 | var app = express(); 6 | 7 | app.use(express.static(path.join(__dirname, 'dist'))); 8 | 9 | app.get('*', function(req, res) { 10 | res.sendFile(path.join(__dirname, 'dist/index.html')); 11 | }); 12 | 13 | const port = process.env.PORT || '3001'; 14 | app.set('port', port); 15 | 16 | const server = http.createServer(app); 17 | server.listen(port, () => console.log('Running')); 18 | -------------------------------------------------------------------------------- /angular-heroku/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | 5 | import { AppComponent } from './app.component'; 6 | 7 | 8 | @NgModule({ 9 | declarations: [ 10 | AppComponent 11 | ], 12 | imports: [ 13 | BrowserModule 14 | ], 15 | providers: [], 16 | bootstrap: [AppComponent] 17 | }) 18 | export class AppModule { } 19 | -------------------------------------------------------------------------------- /angular-heroku/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-heroku/src/assets/.gitkeep -------------------------------------------------------------------------------- /angular-heroku/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular-heroku/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /angular-heroku/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularHeroku 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /angular-heroku/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /angular-heroku/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /angular-heroku/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /angular-heroku/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /angular-heroku/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-material/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # e2e 39 | /e2e/*.js 40 | /e2e/*.map 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | /bin/ 46 | -------------------------------------------------------------------------------- /angular-material/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |

Basic Buttons

2 |
3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 |

Raised Buttons

11 |
12 | 13 | 14 | 15 | 16 | 17 |
18 | -------------------------------------------------------------------------------- /angular-material/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {MatButtonModule} from '@angular/material/button'; 3 | 4 | @Component({ 5 | selector: 'app-root', 6 | templateUrl: 'app.component.html', 7 | styles: [] 8 | }) 9 | export class AppComponent { 10 | } 11 | -------------------------------------------------------------------------------- /angular-material/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import {BrowserModule} from '@angular/platform-browser'; 2 | import {NgModule} from '@angular/core'; 3 | import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; 4 | import {MatButtonModule} from '@angular/material'; 5 | 6 | import {AppComponent} from './app.component'; 7 | 8 | 9 | @NgModule({ 10 | declarations: [ 11 | AppComponent 12 | ], 13 | imports: [ 14 | BrowserModule, 15 | BrowserAnimationsModule, 16 | MatButtonModule 17 | ], 18 | providers: [], 19 | bootstrap: [AppComponent] 20 | }) 21 | export class AppModule {} 22 | -------------------------------------------------------------------------------- /angular-material/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-material/src/assets/.gitkeep -------------------------------------------------------------------------------- /angular-material/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular-material/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /angular-material/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularMaterial 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /angular-material/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /angular-material/src/styles.css: -------------------------------------------------------------------------------- 1 | @import "~@angular/material/prebuilt-themes/purple-green.css"; -------------------------------------------------------------------------------- /angular-material/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /angular-material/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /angular-material/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-primeng/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # e2e 39 | /e2e/*.js 40 | /e2e/*.map 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /angular-primeng/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |

Angular App with PrimeNG style

2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /angular-primeng/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: 'app.component.html', 6 | styles: [] 7 | }) 8 | export class AppComponent { 9 | title = 'app'; 10 | } 11 | -------------------------------------------------------------------------------- /angular-primeng/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import {BrowserModule} from '@angular/platform-browser'; 2 | import {NgModule} from '@angular/core'; 3 | 4 | import {ButtonModule} from 'primeng/button'; 5 | import {AppComponent} from './app.component'; 6 | 7 | 8 | @NgModule({ 9 | declarations: [ 10 | AppComponent 11 | ], 12 | imports: [ 13 | BrowserModule, 14 | ButtonModule 15 | ], 16 | providers: [], 17 | bootstrap: [AppComponent] 18 | }) 19 | export class AppModule {} 20 | -------------------------------------------------------------------------------- /angular-primeng/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-primeng/src/assets/.gitkeep -------------------------------------------------------------------------------- /angular-primeng/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular-primeng/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /angular-primeng/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularPrimeng 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /angular-primeng/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /angular-primeng/src/styles.css: -------------------------------------------------------------------------------- 1 | @import "~primeng/resources/themes/omega/theme.css"; 2 | @import "~primeng/resources/primeng.min.css"; -------------------------------------------------------------------------------- /angular-primeng/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /angular-primeng/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /angular-primeng/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-rest-services/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # e2e 39 | /e2e/*.js 40 | /e2e/*.map 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /angular-rest-services/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |

Search Books (from www.googleapis.com/books)

2 | 3 | 4 | 5 | 6 | 7 |

{{book}}

8 | -------------------------------------------------------------------------------- /angular-rest-services/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | import { BooksService } from './books.service'; 4 | 5 | @Component({ 6 | selector: 'app-root', 7 | templateUrl: './app.component.html' 8 | }) 9 | export class AppComponent { 10 | books: string[] = []; 11 | 12 | constructor(private service: BooksService) { } 13 | 14 | search(title: string) { 15 | this.books = []; 16 | this.service.getBooks(title).subscribe( 17 | success => this.books = success, 18 | error => console.error(error) 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /angular-rest-services/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { HttpModule } from '@angular/http'; 5 | 6 | import { AppComponent } from './app.component'; 7 | import { BooksService } from './books.service'; 8 | 9 | @NgModule({ 10 | declarations: [AppComponent], 11 | imports: [BrowserModule, FormsModule, HttpModule], 12 | providers: [BooksService], 13 | bootstrap: [AppComponent] 14 | }) 15 | export class AppModule { } 16 | -------------------------------------------------------------------------------- /angular-rest-services/src/app/books.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Http, Response } from '@angular/http'; 3 | import 'rxjs/Rx'; 4 | 5 | @Injectable() 6 | export class BooksService { 7 | 8 | constructor(private http: Http) { } 9 | 10 | getBooks(title: string) { 11 | let url = "https://www.googleapis.com/books/v1/volumes?q=intitle:" + title; 12 | return this.http.get(url).map(response => this.extractTitles(response)) 13 | } 14 | 15 | private extractTitles(response: Response) { 16 | let out = response.json().items.map(book => book.volumeInfo.title); 17 | return out; 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /angular-rest-services/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-rest-services/src/assets/.gitkeep -------------------------------------------------------------------------------- /angular-rest-services/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular-rest-services/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /angular-rest-services/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularRestServices 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /angular-rest-services/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /angular-rest-services/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /angular-rest-services/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /angular-rest-services/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /angular-rest-services/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-routing/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # e2e 39 | /e2e/*.js 40 | /e2e/*.map 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /angular-routing/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | template: ` 6 |

Library

7 | 8 | ` 9 | }) 10 | export class AppComponent {} 11 | -------------------------------------------------------------------------------- /angular-routing/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import {BrowserModule} from '@angular/platform-browser'; 2 | import {FormsModule} from '@angular/forms'; 3 | import {NgModule} from '@angular/core'; 4 | import {HttpModule, JsonpModule} from '@angular/http'; 5 | 6 | import {AppComponent} from './app.component'; 7 | import {BookListComponent} from './book-list.component'; 8 | import {BookDetailComponent} from './book-detail.component'; 9 | import {BookService} from './book.service'; 10 | import {routing} from './app.routing'; 11 | 12 | @NgModule({ 13 | declarations: [AppComponent, BookDetailComponent, BookListComponent], 14 | imports: [BrowserModule, FormsModule, HttpModule, routing], 15 | bootstrap: [AppComponent], 16 | providers: [BookService] 17 | }) 18 | export class AppModule {} 19 | 20 | -------------------------------------------------------------------------------- /angular-routing/src/app/app.routing.ts: -------------------------------------------------------------------------------- 1 | import {Routes, RouterModule} from '@angular/router'; 2 | 3 | import {BookListComponent} from './book-list.component'; 4 | import {BookDetailComponent} from './book-detail.component'; 5 | 6 | const appRoutes = [ 7 | {path: '', redirectTo: 'books', pathMatch: 'full'}, 8 | {path: 'books', component: BookListComponent}, 9 | {path: 'book/:id', component: BookDetailComponent, } 10 | ] 11 | 12 | export const routing = RouterModule.forRoot(appRoutes); 13 | -------------------------------------------------------------------------------- /angular-routing/src/app/book-list.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {Book, BookService} from './book.service'; 3 | 4 | @Component({ 5 | template: ` 6 |

Books

7 | 12 | ` 13 | }) 14 | export class BookListComponent { 15 | 16 | books: Book[]; 17 | 18 | constructor(service: BookService) { 19 | this.books = service.getBooks(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /angular-routing/src/app/book.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | 3 | export class Book { 4 | constructor(public id: number, public title: string, public description: string) {} 5 | } 6 | 7 | @Injectable() 8 | export class BookService { 9 | 10 | private books = [ 11 | new Book(11, 'Spring in Action', 12 | 'Craig Walls.'), 13 | new Book(12, 'Java for Web Applications', 14 | 'Nicholas S. Williams'), 15 | new Book(13, 'Learning Bootstrap', 16 | 'Aravind Shenoy, Ulrich Sossou'), 17 | new Book(14, 'Client-Server Web Apps with JavaScript and Java', 18 | 'Casimir Saternos.') 19 | ]; 20 | 21 | getBooks() { 22 | return this.books; 23 | } 24 | 25 | getBook(id: number) { 26 | return this.books.find(book => book.id == id); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /angular-routing/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/angular-routing/src/assets/.gitkeep -------------------------------------------------------------------------------- /angular-routing/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular-routing/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /angular-routing/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularRouting 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /angular-routing/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /angular-routing/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /angular-routing/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /angular-routing/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /angular-routing/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /bootstrap/cinqueterre.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/bootstrap/cinqueterre.jpg -------------------------------------------------------------------------------- /bootstrap/img_chania.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/bootstrap/img_chania.jpg -------------------------------------------------------------------------------- /bootstrap/img_chania2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/bootstrap/img_chania2.jpg -------------------------------------------------------------------------------- /bootstrap/img_flower.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/bootstrap/img_flower.jpg -------------------------------------------------------------------------------- /bootstrap/img_flower2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/bootstrap/img_flower2.jpg -------------------------------------------------------------------------------- /bootstrap/moustiers-sainte-marie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/bootstrap/moustiers-sainte-marie.jpg -------------------------------------------------------------------------------- /bootstrap/pulpitrock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/bootstrap/pulpitrock.jpg -------------------------------------------------------------------------------- /css/background1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS example 6 | 12 | 13 | 14 | 15 |

Hello World

16 | 17 | 18 | -------------------------------------------------------------------------------- /css/button.css: -------------------------------------------------------------------------------- 1 | div { 2 | height: 50px; 3 | width: 120px; 4 | border: 5px solid #6495ED; 5 | background-color: #BCD2EE; 6 | border-radius: 15px; 7 | text-align: center; 8 | } 9 | 10 | a { 11 | text-decoration: none; 12 | color: #3D59AB; 13 | font-family: Verdana, sans-serif; 14 | } 15 | 16 | span { 17 | font-weight: bold; 18 | font-size: 18px; 19 | color: #ffffff; 20 | } -------------------------------------------------------------------------------- /css/button.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Facebook button 6 | 7 | 8 | 9 | 10 |
11 | Friend us on Facebook! 12 | 13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /css/color.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS example 6 | 21 | 22 | 23 | 24 |

What's CSS for?

25 |

CSS is for styling HTML pages!

26 |

Why use it?

27 |

28 | It makes web pages look really cool. 29 |

30 |

What do I think of it?

31 |

It's awesome!

32 | 33 | 34 | -------------------------------------------------------------------------------- /css/css1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS in HTML element 5 | 6 | 7 |

Red text!

8 | 9 | 10 | -------------------------------------------------------------------------------- /css/css2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS in head section 5 | 10 | 11 | 12 |

Green text!

13 | 14 | 15 | -------------------------------------------------------------------------------- /css/css3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS in separate file 5 | 6 | 7 | 8 |

Blue text!

9 | 10 | 11 | -------------------------------------------------------------------------------- /css/css3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/css/css3.png -------------------------------------------------------------------------------- /css/divs1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Divs 6 | 28 | 29 | 30 | 31 |
A
32 |
B
33 |
C
34 |
D
35 | 36 | 37 | -------------------------------------------------------------------------------- /css/dropdown.css: -------------------------------------------------------------------------------- 1 | ul li { 2 | display: inline-block; 3 | position: relative; 4 | margin-right: -4px; 5 | padding: 15px 20px; 6 | background: #eee; 7 | } 8 | 9 | ul li:hover { 10 | background: #ccc; 11 | } 12 | 13 | ul li ul { 14 | position: absolute; 15 | left: 0; 16 | top: 48px; 17 | padding: 0; 18 | display: none; 19 | } 20 | 21 | ul li:hover ul { 22 | display: block; 23 | } 24 | 25 | ul li ul li { 26 | background: #ccc; 27 | display: block; 28 | } 29 | 30 | ul li ul li:hover { 31 | background: #eee; 32 | } 33 | -------------------------------------------------------------------------------- /css/dropdown.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /css/font.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS generic fonts 6 | 11 | 12 | 13 | 14 |

This is an example of serif font.

15 |

This is an example of sans-serif font.

16 |

This is an example of monospace font.

17 |

This is an example of cursive font.

18 |

This is an example of fantasy font.

19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /css/gradient_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/css/gradient_bg.png -------------------------------------------------------------------------------- /css/layout1.css: -------------------------------------------------------------------------------- 1 | .container { 2 | width: 900px; 3 | margin: 0 auto; 4 | } 5 | 6 | .header { 7 | float: left; 8 | width: 100%; 9 | background-color: black; 10 | color: white; 11 | text-align: center; 12 | } 13 | 14 | .nav { 15 | float: left; 16 | width: 100px; 17 | height: 400px; 18 | background-color: #eeeeee; 19 | } 20 | 21 | .main { 22 | width: 780px; 23 | float: left; 24 | } 25 | 26 | .footer { 27 | clear: both; 28 | background-color: black; 29 | color: white; 30 | text-align: center; 31 | } 32 | -------------------------------------------------------------------------------- /css/layout2.css: -------------------------------------------------------------------------------- 1 | .container { 2 | width: 900px; 3 | margin: 0 auto; 4 | } 5 | 6 | .header { 7 | float: left; 8 | width: 100%; 9 | background-color: black; 10 | color: white; 11 | text-align: center; 12 | } 13 | 14 | .content { 15 | float: left; 16 | width: 100%; 17 | position: relative; 18 | } 19 | 20 | .nav { 21 | width: 100px; 22 | position: absolute; 23 | top: 0; 24 | bottom: 0; 25 | left: 0; 26 | background-color: #eeeeee; 27 | } 28 | 29 | .main { 30 | margin-left: 100px; 31 | float: left; 32 | } 33 | 34 | .footer { 35 | clear: both; 36 | background-color: black; 37 | color: white; 38 | text-align: center; 39 | } 40 | -------------------------------------------------------------------------------- /css/links.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS example 6 | 27 | 28 | 29 | 30 | My link 31 | 32 | 33 | -------------------------------------------------------------------------------- /css/nesting.css: -------------------------------------------------------------------------------- 1 | /* Resulting CSS */ 2 | .parent { 3 | margin-top: 1rem; 4 | } 5 | 6 | .parent .child { 7 | float: left; 8 | background: blue; 9 | } -------------------------------------------------------------------------------- /css/nesting.sass: -------------------------------------------------------------------------------- 1 | // Sass 2 | .parent 3 | margin-top: 1rem 4 | 5 | .child 6 | float: left 7 | background: blue -------------------------------------------------------------------------------- /css/nesting.scss: -------------------------------------------------------------------------------- 1 | // SCSS 2 | .parent { 3 | margin-top: 1rem; 4 | 5 | .child { 6 | float: left; 7 | background: blue; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /css/sansation_light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/css/sansation_light.woff -------------------------------------------------------------------------------- /css/styles.css: -------------------------------------------------------------------------------- 1 | p { 2 | color: blue; 3 | } -------------------------------------------------------------------------------- /css/text1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS example 6 | 21 | 22 | 23 | 24 |

What's CSS for?

25 |

CSS is for styling HTML pages!

26 |

Why use it?

27 |

28 | It makes web pages look really cool. 29 |

30 |

What do I think of it?

31 |

It's awesome!

32 | 33 | 34 | -------------------------------------------------------------------------------- /css/text2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS example 6 | 18 | 19 | 20 | 21 |

Hello World

22 |

This is formatted text.

23 | 24 | 25 | -------------------------------------------------------------------------------- /ecmascript6/const1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ecmascript6/const2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ecmascript6/const3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ecmascript6/fat-arrow-syntax.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ecmascript6/for-of.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ecmascript6/let.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /ecmascript6/map.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ecmascript6/multiline-strings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /ecmascript6/promises.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /ecmascript6/set.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /heroku-spring-boot-postgresql/Procfile: -------------------------------------------------------------------------------- 1 | web: java -Dserver.port=$PORT -jar target/heroku-spring-boot-postgresql-1.0.0.jar 2 | -------------------------------------------------------------------------------- /heroku-spring-boot-postgresql/src/main/java/io/github/web/heroku/CustomerRepository.java: -------------------------------------------------------------------------------- 1 | package io.github.web.heroku; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.repository.CrudRepository; 6 | 7 | public interface CustomerRepository extends CrudRepository { 8 | 9 | List findByLastName(String lastName); 10 | 11 | List findByFirstName(String firstName); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /heroku-spring-boot-postgresql/src/main/java/io/github/web/heroku/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.heroku; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /heroku-spring-boot-postgresql/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.url=${JDBC_DATABASE_URL} 2 | spring.datasource.driverClassName=org.postgresql.Driver 3 | spring.datasource.maxActive=10 4 | spring.datasource.maxIdle=5 5 | spring.datasource.minIdle=2 6 | spring.datasource.initialSize=5 7 | spring.datasource.removeAbandoned=true 8 | 9 | spring.jpa.hibernate.ddl-auto=update 10 | -------------------------------------------------------------------------------- /heroku-spring-boot-postgresql/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Heroku 5 | 6 | 7 | Hello Heroku! 8 | 9 | 10 | -------------------------------------------------------------------------------- /html/basic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page title 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

14 | This is text in bold and italics. 15 |

16 | 17 | 18 | -------------------------------------------------------------------------------- /html/frameset.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /html/headings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |

This is heading 1

7 |

This is heading 2

8 |

This is heading 3

9 |

This is heading 4

10 |
This is heading 5
11 |
This is heading 6
12 | 13 |

This paragraph one.

14 |

This paragraph two.

15 |

Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla.

16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /html/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello 6 | 7 | 8 | 9 |

Hello World!

10 | 11 | 12 | -------------------------------------------------------------------------------- /html/iframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | iframe 6 | 7 | 8 | 9 |

This is an example of page with iframe:

10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /html/image.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Image 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /html/lists.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
    6 |
  1. Go to class
  2. 7 |
  3. Make the exercises
  4. 8 |
  5. Study
  6. 9 |
  7. Pass
  8. 10 |
11 | 12 |
    13 |
  • Go to class
  • 14 |
  • Make the exercises
  • 15 |
  • Study
  • 16 |
  • Pass
  • 17 |
18 | 19 |
20 |
Coffee
21 |
Black hot drink
22 |
Milk
23 |
White cold drink
24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /html/table.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Table 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
Famous MonsterBirth Year
King Kong1933
Dracula1897
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /ionic-hello-world/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | 10 | # We recommend you to keep these unchanged 11 | end_of_line = lf 12 | charset = utf-8 13 | trim_trailing_whitespace = true 14 | insert_final_newline = true 15 | 16 | [*.md] 17 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /ionic-hello-world/.gitignore: -------------------------------------------------------------------------------- 1 | # Specifies intentionally untracked files to ignore when using Git 2 | # http://git-scm.com/docs/gitignore 3 | 4 | *~ 5 | *.sw[mnpcod] 6 | *.log 7 | *.tmp 8 | *.tmp.* 9 | log.txt 10 | *.sublime-project 11 | *.sublime-workspace 12 | .vscode/ 13 | npm-debug.log* 14 | 15 | .idea/ 16 | .sourcemaps/ 17 | .sass-cache/ 18 | .tmp/ 19 | .versions/ 20 | coverage/ 21 | dist/ 22 | node_modules/ 23 | tmp/ 24 | temp/ 25 | hooks/ 26 | platforms/ 27 | plugins/ 28 | plugins/android.json 29 | plugins/ios.json 30 | www/ 31 | $RECYCLE.BIN/ 32 | 33 | .DS_Store 34 | Thumbs.db 35 | UserInterfaceState.xcuserstate 36 | -------------------------------------------------------------------------------- /ionic-hello-world/ionic.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ionic-hello-world", 3 | "app_id": "f448394e", 4 | "type": "ionic-angular", 5 | "integrations": { 6 | "cordova": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ionic-hello-world/resources/README.md: -------------------------------------------------------------------------------- 1 | These are Cordova resources. You can replace icon.png and splash.png and run 2 | `ionic cordova resources` to generate custom icons and splash screens for your 3 | app. See `ionic cordova resources --help` for details. 4 | 5 | Cordova reference documentation: 6 | 7 | - Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html 8 | - Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/ 9 | -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/icon/drawable-hdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/icon/drawable-hdpi-icon.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/icon/drawable-ldpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/icon/drawable-ldpi-icon.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/icon/drawable-mdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/icon/drawable-mdpi-icon.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/icon/drawable-xhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/icon/drawable-xhdpi-icon.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/icon/drawable-xxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/icon/drawable-xxhdpi-icon.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/icon/drawable-xxxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/icon/drawable-xxxhdpi-icon.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/splash/drawable-land-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-land-hdpi-screen.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/splash/drawable-land-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-land-ldpi-screen.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/splash/drawable-land-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-land-mdpi-screen.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/splash/drawable-land-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-land-xhdpi-screen.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/splash/drawable-land-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-land-xxhdpi-screen.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/splash/drawable-land-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-land-xxxhdpi-screen.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/splash/drawable-port-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-port-hdpi-screen.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/splash/drawable-port-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-port-ldpi-screen.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/splash/drawable-port-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-port-mdpi-screen.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/splash/drawable-port-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-port-xhdpi-screen.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/splash/drawable-port-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-port-xxhdpi-screen.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/android/splash/drawable-port-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/android/splash/drawable-port-xxxhdpi-screen.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/icon.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-1024.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-40.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-40@2x.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-40@3x.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-50.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-50@2x.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-60.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-60@2x.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-60@3x.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-72.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-72@2x.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-76.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-76@2x.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-83.5@2x.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-small.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-small@2x.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon-small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon-small@3x.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/icon/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/icon/icon@2x.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/splash/Default-568h@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-568h@2x~iphone.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/splash/Default-667h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-667h.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/splash/Default-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-736h.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/splash/Default-Landscape-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-Landscape-736h.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/splash/Default-Landscape@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-Landscape@2x~ipad.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/splash/Default-Landscape@~ipadpro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-Landscape@~ipadpro.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/splash/Default-Landscape~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-Landscape~ipad.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/ios/splash/Default-Portrait@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/ios/splash/Default-Portrait@2x~ipad.png -------------------------------------------------------------------------------- /ionic-hello-world/resources/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/resources/splash.png -------------------------------------------------------------------------------- /ionic-hello-world/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { Platform } from 'ionic-angular'; 3 | import { StatusBar } from '@ionic-native/status-bar'; 4 | import { SplashScreen } from '@ionic-native/splash-screen'; 5 | 6 | import { HomePage } from '../pages/home/home'; 7 | @Component({ 8 | templateUrl: 'app.html' 9 | }) 10 | export class MyApp { 11 | rootPage:any = HomePage; 12 | 13 | constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) { 14 | platform.ready().then(() => { 15 | // Okay, so the platform is ready and our plugins are available. 16 | // Here you can do any higher level native things you might need. 17 | statusBar.styleDefault(); 18 | splashScreen.hide(); 19 | }); 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /ionic-hello-world/src/app/app.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ionic-hello-world/src/app/app.scss: -------------------------------------------------------------------------------- 1 | // http://ionicframework.com/docs/theming/ 2 | 3 | 4 | // App Global Sass 5 | // -------------------------------------------------- 6 | // Put style rules here that you want to apply globally. These 7 | // styles are for the entire app and not just one component. 8 | // Additionally, this file can be also used as an entry point 9 | // to import other Sass files to be included in the output CSS. 10 | // 11 | // Shared Sass variables, which can be used to adjust Ionic's 12 | // default Sass variables, belong in "theme/variables.scss". 13 | // 14 | // To declare rules for a specific mode, create a child rule 15 | // for the .md, .ios, or .wp mode classes. The mode class is 16 | // automatically applied to the element in the app. 17 | -------------------------------------------------------------------------------- /ionic-hello-world/src/app/main.ts: -------------------------------------------------------------------------------- 1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 2 | 3 | import { AppModule } from './app.module'; 4 | 5 | platformBrowserDynamic().bootstrapModule(AppModule); 6 | -------------------------------------------------------------------------------- /ionic-hello-world/src/assets/icon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/src/assets/icon/favicon.ico -------------------------------------------------------------------------------- /ionic-hello-world/src/assets/imgs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-hello-world/src/assets/imgs/logo.png -------------------------------------------------------------------------------- /ionic-hello-world/src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Ionic", 3 | "short_name": "Ionic", 4 | "start_url": "index.html", 5 | "display": "standalone", 6 | "icons": [{ 7 | "src": "assets/imgs/logo.png", 8 | "sizes": "512x512", 9 | "type": "image/png" 10 | }], 11 | "background_color": "#4e8ef7", 12 | "theme_color": "#4e8ef7" 13 | } -------------------------------------------------------------------------------- /ionic-hello-world/src/pages/home/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Ionic Blank 5 | 6 | 7 | 8 | 9 | 10 | The world is your oyster. 11 |

12 | If you get lost, the docs will be your guide. 13 |

14 |
15 | -------------------------------------------------------------------------------- /ionic-hello-world/src/pages/home/home.scss: -------------------------------------------------------------------------------- 1 | page-home { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /ionic-hello-world/src/pages/home/home.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController } from 'ionic-angular'; 3 | 4 | @Component({ 5 | selector: 'page-home', 6 | templateUrl: 'home.html' 7 | }) 8 | export class HomePage { 9 | 10 | constructor(public navCtrl: NavController) { 11 | 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ionic-hello-world/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "declaration": false, 5 | "emitDecoratorMetadata": true, 6 | "experimentalDecorators": true, 7 | "lib": [ 8 | "dom", 9 | "es2015" 10 | ], 11 | "module": "es2015", 12 | "moduleResolution": "node", 13 | "sourceMap": true, 14 | "target": "es5" 15 | }, 16 | "include": [ 17 | "src/**/*.ts" 18 | ], 19 | "exclude": [ 20 | "node_modules", 21 | "src/**/*.spec.ts", 22 | "src/**/__tests__/*.ts" 23 | ], 24 | "compileOnSave": false, 25 | "atom": { 26 | "rewriteTsconfig": false 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ionic-hello-world/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-variable": true, 4 | "no-unused-variable": [ 5 | true 6 | ] 7 | }, 8 | "rulesDirectory": [ 9 | "node_modules/tslint-eslint-rules/dist/rules" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /ionic-tabs/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | 10 | # We recommend you to keep these unchanged 11 | end_of_line = lf 12 | charset = utf-8 13 | trim_trailing_whitespace = true 14 | insert_final_newline = true 15 | 16 | [*.md] 17 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /ionic-tabs/.gitignore: -------------------------------------------------------------------------------- 1 | # Specifies intentionally untracked files to ignore when using Git 2 | # http://git-scm.com/docs/gitignore 3 | 4 | *~ 5 | *.sw[mnpcod] 6 | *.log 7 | *.tmp 8 | *.tmp.* 9 | log.txt 10 | *.sublime-project 11 | *.sublime-workspace 12 | .vscode/ 13 | npm-debug.log* 14 | 15 | .idea/ 16 | .sourcemaps/ 17 | .sass-cache/ 18 | .tmp/ 19 | .versions/ 20 | coverage/ 21 | dist/ 22 | node_modules/ 23 | tmp/ 24 | temp/ 25 | hooks/ 26 | platforms/ 27 | plugins/ 28 | plugins/android.json 29 | plugins/ios.json 30 | www/ 31 | $RECYCLE.BIN/ 32 | 33 | .DS_Store 34 | Thumbs.db 35 | UserInterfaceState.xcuserstate 36 | -------------------------------------------------------------------------------- /ionic-tabs/ionic.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ionic-tabs", 3 | "app_id": "", 4 | "type": "ionic-angular", 5 | "integrations": {} 6 | } 7 | -------------------------------------------------------------------------------- /ionic-tabs/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { Platform } from 'ionic-angular'; 3 | import { StatusBar } from '@ionic-native/status-bar'; 4 | import { SplashScreen } from '@ionic-native/splash-screen'; 5 | 6 | import { TabsPage } from '../pages/tabs/tabs'; 7 | 8 | @Component({ 9 | templateUrl: 'app.html' 10 | }) 11 | export class MyApp { 12 | rootPage:any = TabsPage; 13 | 14 | constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) { 15 | platform.ready().then(() => { 16 | // Okay, so the platform is ready and our plugins are available. 17 | // Here you can do any higher level native things you might need. 18 | statusBar.styleDefault(); 19 | splashScreen.hide(); 20 | }); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ionic-tabs/src/app/app.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ionic-tabs/src/app/app.scss: -------------------------------------------------------------------------------- 1 | // http://ionicframework.com/docs/theming/ 2 | 3 | 4 | // App Global Sass 5 | // -------------------------------------------------- 6 | // Put style rules here that you want to apply globally. These 7 | // styles are for the entire app and not just one component. 8 | // Additionally, this file can be also used as an entry point 9 | // to import other Sass files to be included in the output CSS. 10 | // 11 | // Shared Sass variables, which can be used to adjust Ionic's 12 | // default Sass variables, belong in "theme/variables.scss". 13 | // 14 | // To declare rules for a specific mode, create a child rule 15 | // for the .md, .ios, or .wp mode classes. The mode class is 16 | // automatically applied to the element in the app. 17 | -------------------------------------------------------------------------------- /ionic-tabs/src/app/main.ts: -------------------------------------------------------------------------------- 1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 2 | 3 | import { AppModule } from './app.module'; 4 | 5 | platformBrowserDynamic().bootstrapModule(AppModule); 6 | -------------------------------------------------------------------------------- /ionic-tabs/src/assets/icon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-tabs/src/assets/icon/favicon.ico -------------------------------------------------------------------------------- /ionic-tabs/src/assets/imgs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/ionic-tabs/src/assets/imgs/logo.png -------------------------------------------------------------------------------- /ionic-tabs/src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Ionic", 3 | "short_name": "Ionic", 4 | "start_url": "index.html", 5 | "display": "standalone", 6 | "icons": [{ 7 | "src": "assets/imgs/logo.png", 8 | "sizes": "512x512", 9 | "type": "image/png" 10 | }], 11 | "background_color": "#4e8ef7", 12 | "theme_color": "#4e8ef7" 13 | } -------------------------------------------------------------------------------- /ionic-tabs/src/pages/about/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | About 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Username 19 | 20 | 21 | 22 | Password 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ionic-tabs/src/pages/about/about.scss: -------------------------------------------------------------------------------- 1 | page-about { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /ionic-tabs/src/pages/about/about.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController } from 'ionic-angular'; 3 | 4 | @Component({ 5 | selector: 'page-about', 6 | templateUrl: 'about.html' 7 | }) 8 | export class AboutPage { 9 | 10 | constructor(public navCtrl: NavController) { 11 | 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ionic-tabs/src/pages/contact/contact.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Contact 5 | 6 | 7 | 8 | 9 | 10 | 11 | Follow us on Twitter 12 | 13 | 14 | @ionicframework 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ionic-tabs/src/pages/contact/contact.scss: -------------------------------------------------------------------------------- 1 | page-contact { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /ionic-tabs/src/pages/contact/contact.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController } from 'ionic-angular'; 3 | 4 | @Component({ 5 | selector: 'page-contact', 6 | templateUrl: 'contact.html' 7 | }) 8 | export class ContactPage { 9 | 10 | constructor(public navCtrl: NavController) { 11 | 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ionic-tabs/src/pages/home/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Home 4 | 5 | 6 | 7 | 8 |

Welcome to Ionic!

9 |

10 | This starter project comes with simple tabs-based layout for apps 11 | that are going to primarily use a Tabbed UI. 12 |

13 |

14 | Take a look at the src/pages/ directory to add or change tabs, 15 | update any existing page or create new pages. 16 |

17 |
18 | -------------------------------------------------------------------------------- /ionic-tabs/src/pages/home/home.scss: -------------------------------------------------------------------------------- 1 | page-home { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /ionic-tabs/src/pages/home/home.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { NavController } from 'ionic-angular'; 3 | 4 | @Component({ 5 | selector: 'page-home', 6 | templateUrl: 'home.html' 7 | }) 8 | export class HomePage { 9 | 10 | constructor(public navCtrl: NavController) { 11 | 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ionic-tabs/src/pages/tabs/tabs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ionic-tabs/src/pages/tabs/tabs.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | import { AboutPage } from '../about/about'; 4 | import { ContactPage } from '../contact/contact'; 5 | import { HomePage } from '../home/home'; 6 | 7 | @Component({ 8 | templateUrl: 'tabs.html' 9 | }) 10 | export class TabsPage { 11 | 12 | tab1Root = HomePage; 13 | tab2Root = AboutPage; 14 | tab3Root = ContactPage; 15 | 16 | constructor() { 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ionic-tabs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "declaration": false, 5 | "emitDecoratorMetadata": true, 6 | "experimentalDecorators": true, 7 | "lib": [ 8 | "dom", 9 | "es2015" 10 | ], 11 | "module": "es2015", 12 | "moduleResolution": "node", 13 | "sourceMap": true, 14 | "target": "es5" 15 | }, 16 | "include": [ 17 | "src/**/*.ts" 18 | ], 19 | "exclude": [ 20 | "node_modules", 21 | "src/**/*.spec.ts", 22 | "src/**/__tests__/*.ts" 23 | ], 24 | "compileOnSave": false, 25 | "atom": { 26 | "rewriteTsconfig": false 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ionic-tabs/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-variable": true, 4 | "no-unused-variable": [ 5 | true 6 | ] 7 | }, 8 | "rulesDirectory": [ 9 | "node_modules/tslint-eslint-rules/dist/rules" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /javascript/ajax.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

XMLHttpRequest example

6 | 7 |

8 | 9 | 10 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /javascript/arrays.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /javascript/comparator.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /javascript/exceptions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /javascript/functions01.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /javascript/functions02.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /javascript/functions03.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /javascript/info.txt: -------------------------------------------------------------------------------- 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -------------------------------------------------------------------------------- /javascript/js01.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /javascript/js02.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /javascript/js03.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /javascript/obj01.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /javascript/obj02.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 |

20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /javascript/obj03.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /javascript/obj04.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /javascript/obj05.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /javascript/obj06.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /javascript/obj07.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /javascript/obj08.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /javascript/obj09.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /javascript/obj10.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /javascript/obj11.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /javascript/obj12.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /javascript/obj13.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /javascript/script.js: -------------------------------------------------------------------------------- 1 | function hello() { 2 | alert('Hello World'); 3 | } 4 | -------------------------------------------------------------------------------- /javascript/this.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /javascript/validate-form.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Validate form 6 | 7 | 8 | 21 | 22 | 23 |
24 | 25 | 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /jquery/cookies.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 19 | 20 | 21 | 22 |

Using cookies...

23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /jquery/jquery02.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 20 | 21 | 22 | 23 | 24 |
HELLO
25 | 26 | 27 | -------------------------------------------------------------------------------- /jquery/jquery06.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 14 | 15 | 16 |
17 |

Let jQuery AJAX Change This Text

18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /jquery/jquery07.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 18 | 19 | 20 | 21 |
22 |

Let jQuery AJAX Change This Text

23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /jquery/lore.html: -------------------------------------------------------------------------------- 1 |

Lorem ipsum ad his scripta blandit partiendo, eum fastidii accumsan euripidis in, eum liber hendrerit an. Qui ut wisi vocibus suscipiantur, quo dicit ridens inciderint id. Quo mundi lobortis reformidans eu, legimus senserit definiebas an eos. Eu sit tincidunt incorrupte definitionem, vis mutat affert percipit cu, eirmod consectetuer signiferumque eu per. In usu latine equidem dolores. Quo no falli viris intellegam, ut fugit veritus placerat per

-------------------------------------------------------------------------------- /jquery/site-content-page2.html: -------------------------------------------------------------------------------- 1 |

Page 2

2 |

Lorem ipsum ad his scripta blandit partiendo, eum fastidii 3 | accumsan euripidis in, eum liber hendrerit an. Qui ut wisi vocibus 4 | suscipiantur, quo dicit ridens inciderint id. Quo mundi lobortis 5 | reformidans eu, legimus senserit definiebas an eos. Eu sit tincidunt 6 | incorrupte definitionem, vis mutat affert percipit cu, eirmod 7 | consectetuer signiferumque eu per. In usu latine equidem dolores. Quo 8 | no falli viris intellegam, ut fugit veritus placerat per.

9 | -------------------------------------------------------------------------------- /jquery/site-layout.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Header

4 |
5 |
6 | 10 |
11 |
12 | 13 |
14 | -------------------------------------------------------------------------------- /jquery/site-page1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /jquery/site-page2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /jquery/site.css: -------------------------------------------------------------------------------- 1 | .container { 2 | width: 900px; 3 | margin: 0 auto; 4 | } 5 | 6 | .header { 7 | float: left; 8 | width: 100%; 9 | background-color: black; 10 | color: white; 11 | text-align: center; 12 | } 13 | 14 | .content { 15 | float: left; 16 | width: 100%; 17 | position: relative; 18 | } 19 | 20 | .nav { 21 | width: 100px; 22 | position: absolute; 23 | top: 0; 24 | bottom: 0; 25 | left: 0; 26 | background-color: #eeeeee; 27 | } 28 | 29 | .main { 30 | margin-left: 100px; 31 | float: left; 32 | } 33 | 34 | .footer { 35 | clear: both; 36 | background-color: black; 37 | color: white; 38 | text-align: center; 39 | } 40 | -------------------------------------------------------------------------------- /jquery/w3jquery.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/jquery/w3jquery.gif -------------------------------------------------------------------------------- /junit-selenium/src/test/java/io/github/web/selenium/FirefoxTest.java: -------------------------------------------------------------------------------- 1 | package io.github.web.selenium; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertTrue; 4 | 5 | import org.junit.jupiter.api.Test; 6 | import org.junit.jupiter.api.extension.ExtendWith; 7 | import org.openqa.selenium.firefox.FirefoxDriver; 8 | 9 | import io.github.bonigarcia.SeleniumExtension; 10 | 11 | @ExtendWith(SeleniumExtension.class) 12 | public class FirefoxTest { 13 | 14 | @Test 15 | void testFirefox(FirefoxDriver driver) { 16 | driver.get("https://bonigarcia.github.io/selenium-jupiter/"); 17 | assertTrue( 18 | driver.getTitle().contains("JUnit 5 extension for Selenium")); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /mongodb/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | io.github.web 5 | mongodb 6 | 1.0.0 7 | 8 | 9 | UTF-8 10 | 1.8 11 | 12 | 13 | 14 | 15 | org.mongodb 16 | mongo-java-driver 17 | 3.6.3 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /nodejs-hello-world/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var app = express(); 3 | 4 | app.get('/', function(req, res) { 5 | res.send('Hello World!'); 6 | }); 7 | 8 | app.listen(3000, function() { 9 | console.log('Example app listening on port 3000!'); 10 | }); 11 | -------------------------------------------------------------------------------- /nodejs-hello-world/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodejs-hello-world", 3 | "version": "1.0.0", 4 | "description": "Node.js simplest app ever", 5 | "license": "Apache-2.0", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/bonigarcia/web-programming-examples.git" 9 | }, 10 | "dependencies": { 11 | "express": "^4.15.0" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /rest-webservices/src/main/java/io/github/web/rest/client/retrofit/TeamsClient.java: -------------------------------------------------------------------------------- 1 | package io.github.web.rest.client.retrofit; 2 | 3 | import java.util.List; 4 | 5 | import io.github.web.rest.service.Team; 6 | import retrofit2.Call; 7 | import retrofit2.http.Body; 8 | import retrofit2.http.GET; 9 | import retrofit2.http.POST; 10 | import retrofit2.http.Path; 11 | import retrofit2.http.Query; 12 | 13 | public interface TeamsClient { 14 | 15 | @GET("/teams") 16 | Call> getTeams(); 17 | 18 | @GET("/team/{index}") 19 | Call getTeamByPath(@Path("index") int index); 20 | 21 | @GET("/team") 22 | Call getTeamByQuery(@Query("index") int index); 23 | 24 | @POST("/teams") 25 | Call addTeam(@Body Team team); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /rest-webservices/src/main/java/io/github/web/rest/service/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.rest.service; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /rest-webservices/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rest-webservices/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | GET 5 |
6 | POST 7 | 8 | 9 | -------------------------------------------------------------------------------- /rest-webservices/src/main/resources/static/jquery-client-get.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 16 | 17 | 18 |
19 |

Team:

20 |

Players:

21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /spring-boot-hello-world/src/main/java/io/github/web/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-hello-world/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8080 2 | -------------------------------------------------------------------------------- /spring-boot-hello-world/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-boot-hello-world/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Spring boot - hello world 5 | 6 | 7 | Hello world! 8 | 9 | 10 | -------------------------------------------------------------------------------- /spring-data-h2/src/main/java/io/github/web/data/h2/CustomerRepository.java: -------------------------------------------------------------------------------- 1 | package io.github.web.data.h2; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | 8 | public interface CustomerRepository extends CrudRepository { 9 | 10 | List findByLastName(String lastName); 11 | 12 | List findByFirstName(String firstName); 13 | 14 | @Query(value = "SELECT * FROM CUSTOMER", nativeQuery = true) 15 | List selectAll(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /spring-data-h2/src/main/java/io/github/web/data/h2/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.data.h2; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-data-h2/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Uncomment this line to store H2 in local file system and allow other simultaneous connections 2 | # spring.datasource.url=jdbc:h2:~/test;AUTO_SERVER=TRUE 3 | 4 | # Uncomment this line to keep the DDL 5 | # spring.jpa.hibernate.ddl-auto=update 6 | -------------------------------------------------------------------------------- /spring-data-h2/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-data-mongodb/src/main/java/io/github/web/data/mongodb/CustomerRepository.java: -------------------------------------------------------------------------------- 1 | package io.github.web.data.mongodb; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.repository.CrudRepository; 6 | 7 | public interface CustomerRepository extends CrudRepository { 8 | 9 | List findByLastName(String lastName); 10 | 11 | List findByFirstName(String firstName); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-data-mongodb/src/main/java/io/github/web/data/mongodb/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.data.mongodb; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-data-mongodb/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.data.mongodb.host=localhost 2 | spring.data.mongodb.port=27017 -------------------------------------------------------------------------------- /spring-data-mongodb/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-data-mysql/src/main/java/io/github/web/data/mysql/CustomerRepository.java: -------------------------------------------------------------------------------- 1 | package io.github.web.data.mysql; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | 8 | public interface CustomerRepository extends CrudRepository { 9 | 10 | List findByLastName(String lastName); 11 | 12 | List findByFirstName(String firstName); 13 | 14 | @Query(value = "SELECT * FROM CUSTOMER", nativeQuery = true) 15 | List selectAll(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /spring-data-mysql/src/main/java/io/github/web/data/mysql/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.data.mysql; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-data-mysql/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.url=jdbc:mysql://localhost/test 2 | spring.datasource.username=root 3 | spring.datasource.password= 4 | spring.datasource.driverClassName=com.mysql.jdbc.Driver 5 | 6 | spring.jpa.hibernate.ddl-auto=create-drop -------------------------------------------------------------------------------- /spring-data-mysql/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-mvc-hello-world/src/main/java/io/github/web/springmvc/MyController.java: -------------------------------------------------------------------------------- 1 | package io.github.web.springmvc; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.servlet.ModelAndView; 6 | 7 | @Controller 8 | public class MyController { 9 | 10 | @RequestMapping("/") 11 | public ModelAndView greeting() { 12 | ModelAndView model = new ModelAndView("hello_world"); 13 | model.addObject("name", "World"); 14 | return model; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-mvc-hello-world/src/main/java/io/github/web/springmvc/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.springmvc; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-mvc-hello-world/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8080 2 | -------------------------------------------------------------------------------- /spring-mvc-hello-world/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-mvc-hello-world/src/main/resources/templates/hello_world.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Spring MVC with Thymeleaf

5 |

6 | Hello ! 7 |

8 | 9 | 10 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-basic/src/main/java/io/github/web/thymeleaf/LinkController.java: -------------------------------------------------------------------------------- 1 | package io.github.web.thymeleaf; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.servlet.ModelAndView; 6 | 7 | @Controller 8 | public class LinkController { 9 | 10 | @RequestMapping("/") 11 | public ModelAndView processHome() { 12 | ModelAndView model = new ModelAndView("home_page"); 13 | return model; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-basic/src/main/java/io/github/web/thymeleaf/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.thymeleaf; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-basic/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8080 2 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-basic/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-basic/src/main/resources/templates/home_page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Home page

5 | Text controller
6 | If controller
7 | Iteration controller
8 | 9 | 10 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-basic/src/main/resources/templates/if_page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Conditional page

5 |

Paragraph #1 is visible!

6 |

Paragraph #2 is also visible!

7 | 8 | 9 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-basic/src/main/resources/templates/loop_page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Iteration page

5 |
    6 |
  • Color
  • 7 |
8 | 9 |

Colors in table:

10 | 11 | 12 | 13 | 14 | 15 |
Color
16 | 17 | 18 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-basic/src/main/resources/templates/text_page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Text page

5 |

6 |

7 |

8 |

9 | 10 | 11 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-forms/src/main/java/io/github/web/thymeleaf/MyForm.java: -------------------------------------------------------------------------------- 1 | package io.github.web.thymeleaf; 2 | 3 | public class MyForm { 4 | 5 | private String info1; 6 | private String info2; 7 | 8 | // Getters, setters, and toString() 9 | 10 | public String getInfo1() { 11 | return info1; 12 | } 13 | 14 | public void setInfo1(String info1) { 15 | this.info1 = info1; 16 | } 17 | 18 | public String getInfo2() { 19 | return info2; 20 | } 21 | 22 | public void setInfo2(String info2) { 23 | this.info2 = info2; 24 | } 25 | 26 | @Override 27 | public String toString() { 28 | return "MyForm [info1=" + info1 + ", info2=" + info2 + "]"; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-forms/src/main/java/io/github/web/thymeleaf/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.thymeleaf; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-forms/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8080 2 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-forms/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-forms/src/main/resources/templates/home_page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Home page

5 | 6 |

Form 1

7 |
8 |
9 |
10 | 11 |
12 | 13 |

Form 2

14 |
15 |
16 |
17 |
18 | 19 |
20 | 21 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-forms/src/main/resources/templates/result_page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Result page

5 |

6 | 7 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-i18n/src/main/java/io/github/web/i18n/MyController.java: -------------------------------------------------------------------------------- 1 | package io.github.web.i18n; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.servlet.ModelAndView; 6 | 7 | @Controller 8 | public class MyController { 9 | 10 | @RequestMapping("/i18n") 11 | public ModelAndView i18n() { 12 | return new ModelAndView("i18n_page"); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-i18n/src/main/resources/messages_en.properties: -------------------------------------------------------------------------------- 1 | welcome=Welcome to my web! 2 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-i18n/src/main/resources/messages_es.properties: -------------------------------------------------------------------------------- 1 | welcome=Bienvenido a mi web! 2 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-i18n/src/main/resources/messages_fr.properties: -------------------------------------------------------------------------------- 1 | welcome=Bienvenue sur mon site web! 2 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-i18n/src/main/resources/templates/i18n_page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

5 | 6 | 7 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-layout/src/main/java/io/github/web/thymeleaf/MyController.java: -------------------------------------------------------------------------------- 1 | package io.github.web.thymeleaf; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.servlet.ModelAndView; 6 | 7 | @Controller 8 | public class MyController { 9 | 10 | @RequestMapping(value = "/page1") 11 | public ModelAndView layout1() { 12 | return new ModelAndView("page1"); 13 | } 14 | 15 | @RequestMapping(value = "/page2") 16 | public ModelAndView layout2() { 17 | return new ModelAndView("page2"); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-layout/src/main/java/io/github/web/thymeleaf/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.thymeleaf; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-layout/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8080 2 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-layout/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-session/src/main/java/io/github/web/thymeleaf/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.thymeleaf; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-session/src/main/java/io/github/web/thymeleaf/User.java: -------------------------------------------------------------------------------- 1 | package io.github.web.thymeleaf; 2 | 3 | import org.springframework.context.annotation.Scope; 4 | import org.springframework.context.annotation.ScopedProxyMode; 5 | import org.springframework.stereotype.Component; 6 | import org.springframework.web.context.WebApplicationContext; 7 | 8 | @Component 9 | @Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS) 10 | public class User { 11 | 12 | private String info; 13 | 14 | public void setInfo(String info) { 15 | this.info = info; 16 | } 17 | 18 | public String getInfo() { 19 | return info; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-session/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8080 2 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-session/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-session/src/main/resources/templates/data_session.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

5 |

6 | 7 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-session/src/main/resources/templates/home_page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Home page

5 |
6 |
7 |
8 | 9 |
10 | 11 | -------------------------------------------------------------------------------- /spring-mvc-thymeleaf-session/src/main/resources/templates/info_session.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Info has been stored. Click 5 | here to show it. 6 | 7 | 8 | -------------------------------------------------------------------------------- /spring-security-aa-advanced/src/main/java/io/github/web/security/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.security; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-security-aa-advanced/src/main/java/io/github/web/security/UserRepository.java: -------------------------------------------------------------------------------- 1 | package io.github.web.security; 2 | 3 | import org.springframework.data.repository.CrudRepository; 4 | 5 | public interface UserRepository extends CrudRepository { 6 | 7 | User findByUser(String user); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /spring-security-aa-advanced/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8080 2 | -------------------------------------------------------------------------------- /spring-security-aa-advanced/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-security-aa-advanced/src/main/resources/templates/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Home 5 | 6 | 7 |

8 | Hello 9 |

10 | 13 |
14 | 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /spring-security-aa-advanced/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Access to protected pages clicking 5 | here! 6 | 7 | 8 | -------------------------------------------------------------------------------- /spring-security-aa-advanced/src/main/resources/templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Login form 5 | 6 | 7 |

Invalid credentials

8 |

Logged out

9 | 10 |
11 |
12 |
13 |
14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-security-aa-advanced/src/main/resources/templates/root.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Admin 5 | 6 | 7 |

Administration page

8 | Back to home 9 | 10 | 11 | -------------------------------------------------------------------------------- /spring-security-aa-medium/src/main/java/io/github/web/security/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.security; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-security-aa-medium/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8080 2 | -------------------------------------------------------------------------------- /spring-security-aa-medium/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-security-aa-medium/src/main/resources/templates/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Home 5 | 6 | 7 |

8 | Hello 9 |

10 | 13 |
14 | 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /spring-security-aa-medium/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Access to protected pages clicking 5 | here! 6 | 7 | 8 | -------------------------------------------------------------------------------- /spring-security-aa-medium/src/main/resources/templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Login form 5 | 6 | 7 |

Invalid credentials

8 |

Logged out

9 | 10 |
11 |
12 |
13 |
14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-security-aa-medium/src/main/resources/templates/root.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Admin 5 | 6 | 7 |

Administration page

8 | Back to home 9 | 10 | 11 | -------------------------------------------------------------------------------- /spring-security-aa-simple/src/main/java/io/github/web/security/MyController.java: -------------------------------------------------------------------------------- 1 | package io.github.web.security; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.servlet.ModelAndView; 6 | 7 | @Controller 8 | public class MyController { 9 | 10 | @RequestMapping("/") 11 | public ModelAndView index() { 12 | return new ModelAndView("index"); 13 | } 14 | 15 | @RequestMapping("/login") 16 | public ModelAndView login() { 17 | return new ModelAndView("login"); 18 | } 19 | 20 | @RequestMapping("/home") 21 | public ModelAndView home() { 22 | return new ModelAndView("home"); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /spring-security-aa-simple/src/main/java/io/github/web/security/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.security; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-security-aa-simple/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8080 2 | -------------------------------------------------------------------------------- /spring-security-aa-simple/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-security-aa-simple/src/main/resources/templates/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Home 5 | 6 | 7 |

Hello Spring Security!

8 |
9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-security-aa-simple/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Access to protected pages clicking 5 | here! 6 | 7 | 8 | -------------------------------------------------------------------------------- /spring-security-aa-simple/src/main/resources/templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Login form 5 | 6 | 7 |

Invalid credentials

8 |

Logged out

9 | 10 |
11 |
12 |
13 |
14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-security-https/src/main/java/io/github/web/security/MyController.java: -------------------------------------------------------------------------------- 1 | package io.github.web.security; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.servlet.ModelAndView; 6 | 7 | @Controller 8 | public class MyController { 9 | 10 | @RequestMapping("/") 11 | public ModelAndView index() { 12 | return new ModelAndView("index"); 13 | } 14 | 15 | @RequestMapping("/login") 16 | public ModelAndView login() { 17 | return new ModelAndView("login"); 18 | } 19 | 20 | @RequestMapping("/home") 21 | public ModelAndView home() { 22 | return new ModelAndView("home"); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /spring-security-https/src/main/java/io/github/web/security/MySpringBootApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.security; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class MySpringBootApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(MySpringBootApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-security-https/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port = 8443 2 | server.ssl.key-store = classpath:keystore.jks 3 | server.ssl.key-store-password = password 4 | server.ssl.key-password = secret 5 | -------------------------------------------------------------------------------- /spring-security-https/src/main/resources/keystore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bonigarcia/web-programming-examples/25c375c290606f09ab2aba7bbda28f4278b2405d/spring-security-https/src/main/resources/keystore.jks -------------------------------------------------------------------------------- /spring-security-https/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-security-https/src/main/resources/templates/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Home 5 | 6 | 7 |

Hello Spring Security!

8 |
9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /spring-security-https/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Access to protected pages clicking 5 | here! 6 | 7 | 8 | -------------------------------------------------------------------------------- /spring-security-https/src/main/resources/templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Login form 5 | 6 | 7 |

Invalid credentials

8 |

Logged out

9 | 10 |
11 |
12 |
13 |
14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-test/src/main/java/io/github/web/springtest/MyComponent.java: -------------------------------------------------------------------------------- 1 | package io.github.web.springtest; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | @Component 6 | public class MyComponent { 7 | 8 | public String sayHello() { 9 | return "Hello world"; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /spring-test/src/main/java/io/github/web/springtest/SpringTestDemoApp.java: -------------------------------------------------------------------------------- 1 | package io.github.web.springtest; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringTestDemoApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringTestDemoApp.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-test/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-test/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Spring Boot Test - Page 1 5 | 6 | 7 | 8 |

Home page

9 | Go to another page. 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-test/src/main/resources/static/other.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Spring Boot Test - Page 2 5 | 6 | 7 | 8 |

Other page

9 | Hello! 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-test/src/test/java/io/github/web/springtest/SpringJupiterTest.java: -------------------------------------------------------------------------------- 1 | package io.github.web.springtest; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import org.junit.jupiter.api.Test; 6 | import org.junit.jupiter.api.extension.ExtendWith; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.boot.test.context.SpringBootTest; 9 | import org.springframework.test.context.junit.jupiter.SpringExtension; 10 | 11 | @ExtendWith(SpringExtension.class) 12 | @SpringBootTest 13 | public class SpringJupiterTest { 14 | 15 | @Autowired 16 | MyComponent myComponent; 17 | 18 | @Test 19 | void test() { 20 | String hello = myComponent.sayHello(); 21 | assertEquals(hello, "Hello world"); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /typescript/class1.ts: -------------------------------------------------------------------------------- 1 | class Person { 2 | private firstName = ""; 3 | private lastName = ""; 4 | 5 | constructor(firstName, lastName) { 6 | this.firstName = firstName; 7 | this.lastName = lastName; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /typescript/class2.ts: -------------------------------------------------------------------------------- 1 | class Person { 2 | constructor(private firstName, private lastName) { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /typescript/decorator.ts: -------------------------------------------------------------------------------- 1 | function Student(config) { 2 | return function (target) { 3 | Object.defineProperty(target.prototype, 'course', {value: () => config.course}) 4 | } 5 | } 6 | 7 | @Student({ 8 | course: "angular3" 9 | }) 10 | class Person { 11 | constructor(private firstName, private lastName) { 12 | } 13 | 14 | public name() { 15 | return `${this.firstName} ${this.lastName}`; 16 | } 17 | 18 | protected whoAreYou() { 19 | return `Hi i'm ${this.name()}`; 20 | } 21 | } 22 | 23 | let john = new Person("John", "Doe"); 24 | console.log(john.whoAreYou()); 25 | -------------------------------------------------------------------------------- /typescript/export.ts: -------------------------------------------------------------------------------- 1 | // export.ts 2 | 3 | function square(x) { 4 | return Math.pow(x,2) 5 | } 6 | 7 | function cow() { 8 | console.log("Mooooo!!!") 9 | } 10 | 11 | export {square, cow}; 12 | -------------------------------------------------------------------------------- /typescript/export2.ts: -------------------------------------------------------------------------------- 1 | // export2.ts 2 | 3 | export default function square(x) { 4 | return Math.pow(x,2) 5 | } 6 | -------------------------------------------------------------------------------- /typescript/hello.ts: -------------------------------------------------------------------------------- 1 | console.log("Hello world"); 2 | -------------------------------------------------------------------------------- /typescript/import.ts: -------------------------------------------------------------------------------- 1 | // import.ts 2 | 3 | import {square, cow} from './export'; 4 | console.log(square(2)); 5 | cow(); 6 | 7 | import {square as sqr} from './utils'; 8 | sqr(2); 9 | 10 | import * as utils from './utils'; 11 | console.log(utils.square(2)); 12 | utils.cow(); 13 | 14 | -------------------------------------------------------------------------------- /typescript/import2.ts: -------------------------------------------------------------------------------- 1 | // import2.ts 2 | 3 | import square from './export'; 4 | -------------------------------------------------------------------------------- /typescript/interfaces.ts: -------------------------------------------------------------------------------- 1 | interface Human { 2 | firstName: string; 3 | lastName: string; 4 | name?: Function; 5 | isLate?(time: Date): Function; 6 | } 7 | 8 | class Person implements Human { 9 | constructor(public firstName, public lastName) { 10 | } 11 | 12 | public name() { 13 | return `${this.firstName} ${this.lastName}`; 14 | } 15 | 16 | protected whoAreYou() { 17 | return `Hi i'm ${this.name()}`; 18 | } 19 | } 20 | 21 | let john = new Student("John", "Doe"); 22 | console.log(john.whoAreYou()); 23 | -------------------------------------------------------------------------------- /typescript/types.ts: -------------------------------------------------------------------------------- 1 | // Basic types 2 | let decimal: number = 6; 3 | let done: boolean = false; 4 | let color: string = "blue"; 5 | 6 | // Arrays 7 | let list: number[] = [1, 2, 3]; 8 | let list: Array = [1, 2, 3]; 9 | 10 | // Functions 11 | let fun: Function = () => console.log("Hello"); 12 | 13 | // Expected return types 14 | function returnNumber(): number { 15 | return 1; 16 | } 17 | 18 | // Void 19 | function returnNothing(): void { 20 | console.log("Moo"); 21 | } 22 | 23 | // Enums 24 | enum Direction { 25 | Up, 26 | Down, 27 | Left, 28 | Right 29 | } 30 | 31 | let go: Direction; 32 | go = Direction.Up; 33 | 34 | // Class 35 | let person: Person; 36 | let people: Person[]; 37 | 38 | // Any 39 | let notsure: any = 1; 40 | --------------------------------------------------------------------------------