├── .gitignore ├── LICENSE ├── README.md ├── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src ├── main ├── java │ └── com │ │ └── djamware │ │ └── angular │ │ ├── AngularApplication.java │ │ ├── controllers │ │ └── ContactController.java │ │ ├── models │ │ └── Contact.java │ │ └── repositories │ │ └── ContactRepository.java └── resources │ ├── application.properties │ └── static │ ├── favicon.ico │ ├── index.html │ ├── inline.bundle.js │ ├── inline.bundle.js.map │ ├── main.bundle.js │ ├── main.bundle.js.map │ ├── polyfills.bundle.js │ ├── polyfills.bundle.js.map │ ├── styles.bundle.js │ ├── styles.bundle.js.map │ ├── vendor.bundle.js │ └── vendor.bundle.js.map └── test └── java └── com └── djamware └── angular └── AngularApplicationTests.java /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /build/ 3 | !gradle/wrapper/gradle-wrapper.jar 4 | 5 | ### STS ### 6 | .apt_generated 7 | .classpath 8 | .factorypath 9 | .project 10 | .settings 11 | .springBeans 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | nbproject/private/ 21 | build/ 22 | nbbuild/ 23 | dist/ 24 | nbdist/ 25 | .nb-gradle/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Didin Jamaludin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Spring Boot, MongoDB and Angular 5 CRUD Java Web Application 2 | 3 | This source code is part of [Spring Boot, MongoDB and Angular 5 CRUD Java Web Application](https://www.djamware.com/post/5a792ecb80aca7059c142978/spring-boot-mongodb-and-angular-5-crud-java-web-application) tutorial. 4 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext { 3 | springBootVersion = '1.5.10.RELEASE' 4 | } 5 | repositories { 6 | mavenCentral() 7 | } 8 | dependencies { 9 | classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") 10 | } 11 | } 12 | 13 | apply plugin: 'java' 14 | apply plugin: 'eclipse' 15 | apply plugin: 'org.springframework.boot' 16 | 17 | group = 'com.djamware' 18 | version = '0.0.1-SNAPSHOT' 19 | sourceCompatibility = 1.8 20 | 21 | repositories { 22 | mavenCentral() 23 | } 24 | 25 | 26 | dependencies { 27 | compile('org.springframework.boot:spring-boot-starter-data-mongodb') 28 | compile('org.springframework.boot:spring-boot-starter-web') 29 | testCompile('org.springframework.boot:spring-boot-starter-test') 30 | } 31 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didinj/spring-boot-mongodb-angular5-java-crud/78a95b5b8bcb8954e6c01eda0a119230de3ff82a/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-bin.zip 6 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS="" 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn ( ) { 37 | echo "$*" 38 | } 39 | 40 | die ( ) { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save ( ) { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /src/main/java/com/djamware/angular/AngularApplication.java: -------------------------------------------------------------------------------- 1 | package com.djamware.angular; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class AngularApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(AngularApplication.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/djamware/angular/controllers/ContactController.java: -------------------------------------------------------------------------------- 1 | package com.djamware.angular.controllers; 2 | 3 | import com.djamware.angular.models.Contact; 4 | import com.djamware.angular.repositories.ContactRepository; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.PathVariable; 7 | import org.springframework.web.bind.annotation.RequestBody; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RequestMethod; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | @RestController 13 | public class ContactController { 14 | 15 | @Autowired 16 | ContactRepository contactRepository; 17 | 18 | @RequestMapping(method=RequestMethod.GET, value="/contacts") 19 | public Iterable contact() { 20 | return contactRepository.findAll(); 21 | } 22 | 23 | @RequestMapping(method=RequestMethod.POST, value="/contacts") 24 | public Contact save(@RequestBody Contact contact) { 25 | contactRepository.save(contact); 26 | 27 | return contact; 28 | } 29 | 30 | @RequestMapping(method=RequestMethod.GET, value="/contacts/{id}") 31 | public Contact show(@PathVariable String id) { 32 | return contactRepository.findOne(id); 33 | } 34 | 35 | @RequestMapping(method=RequestMethod.PUT, value="/contacts/{id}") 36 | public Contact update(@PathVariable String id, @RequestBody Contact contact) { 37 | Contact c = contactRepository.findOne(id); 38 | if(contact.getName() != null) 39 | c.setName(contact.getName()); 40 | if(contact.getAddress() != null) 41 | c.setAddress(contact.getAddress()); 42 | if(contact.getCity() != null) 43 | c.setCity(contact.getCity()); 44 | if(contact.getPhone() != null) 45 | c.setPhone(contact.getPhone()); 46 | if(contact.getEmail() != null) 47 | c.setEmail(contact.getEmail()); 48 | contactRepository.save(c); 49 | return contact; 50 | } 51 | 52 | @RequestMapping(method=RequestMethod.DELETE, value="/contacts/{id}") 53 | public String delete(@PathVariable String id) { 54 | Contact contact = contactRepository.findOne(id); 55 | contactRepository.delete(contact); 56 | 57 | return ""; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/djamware/angular/models/Contact.java: -------------------------------------------------------------------------------- 1 | package com.djamware.angular.models; 2 | 3 | import org.springframework.data.annotation.Id; 4 | import org.springframework.data.mongodb.core.mapping.Document; 5 | 6 | @Document(collection = "contacts") 7 | public class Contact { 8 | @Id 9 | String id; 10 | String name; 11 | String address; 12 | String city; 13 | String phone; 14 | String email; 15 | 16 | public Contact() { 17 | } 18 | 19 | public Contact(String name, String address, String city, String phone, String email) { 20 | this.name = name; 21 | this.address = address; 22 | this.city = city; 23 | this.phone = phone; 24 | this.email = email; 25 | } 26 | 27 | public String getId() { 28 | return id; 29 | } 30 | 31 | public void setId(String id) { 32 | this.id = id; 33 | } 34 | 35 | public String getName() { 36 | return name; 37 | } 38 | 39 | public void setName(String name) { 40 | this.name = name; 41 | } 42 | 43 | public String getAddress() { 44 | return address; 45 | } 46 | 47 | public void setAddress(String address) { 48 | this.address = address; 49 | } 50 | 51 | public String getCity() { 52 | return city; 53 | } 54 | 55 | public void setCity(String city) { 56 | this.city = city; 57 | } 58 | 59 | public String getPhone() { 60 | return phone; 61 | } 62 | 63 | public void setPhone(String phone) { 64 | this.phone = phone; 65 | } 66 | 67 | public String getEmail() { 68 | return email; 69 | } 70 | 71 | public void setEmail(String email) { 72 | this.email = email; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/com/djamware/angular/repositories/ContactRepository.java: -------------------------------------------------------------------------------- 1 | package com.djamware.angular.repositories; 2 | 3 | import com.djamware.angular.models.Contact; 4 | import org.springframework.data.repository.CrudRepository; 5 | 6 | public interface ContactRepository extends CrudRepository { 7 | @Override 8 | Contact findOne(String id); 9 | 10 | @Override 11 | void delete(Contact deleted); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.data.mongodb.database=springangular 2 | spring.data.mongodb.host=localhost 3 | spring.data.mongodb.port=27017 4 | -------------------------------------------------------------------------------- /src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/didinj/spring-boot-mongodb-angular5-java-crud/78a95b5b8bcb8954e6c01eda0a119230de3ff82a/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Frontend 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/resources/static/inline.bundle.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // install a JSONP callback for chunk loading 3 | /******/ var parentJsonpFunction = window["webpackJsonp"]; 4 | /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) { 5 | /******/ // add "moreModules" to the modules object, 6 | /******/ // then flag all "chunkIds" as loaded and fire callback 7 | /******/ var moduleId, chunkId, i = 0, resolves = [], result; 8 | /******/ for(;i < chunkIds.length; i++) { 9 | /******/ chunkId = chunkIds[i]; 10 | /******/ if(installedChunks[chunkId]) { 11 | /******/ resolves.push(installedChunks[chunkId][0]); 12 | /******/ } 13 | /******/ installedChunks[chunkId] = 0; 14 | /******/ } 15 | /******/ for(moduleId in moreModules) { 16 | /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { 17 | /******/ modules[moduleId] = moreModules[moduleId]; 18 | /******/ } 19 | /******/ } 20 | /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules); 21 | /******/ while(resolves.length) { 22 | /******/ resolves.shift()(); 23 | /******/ } 24 | /******/ if(executeModules) { 25 | /******/ for(i=0; i < executeModules.length; i++) { 26 | /******/ result = __webpack_require__(__webpack_require__.s = executeModules[i]); 27 | /******/ } 28 | /******/ } 29 | /******/ return result; 30 | /******/ }; 31 | /******/ 32 | /******/ // The module cache 33 | /******/ var installedModules = {}; 34 | /******/ 35 | /******/ // objects to store loaded and loading chunks 36 | /******/ var installedChunks = { 37 | /******/ "inline": 0 38 | /******/ }; 39 | /******/ 40 | /******/ // The require function 41 | /******/ function __webpack_require__(moduleId) { 42 | /******/ 43 | /******/ // Check if module is in cache 44 | /******/ if(installedModules[moduleId]) { 45 | /******/ return installedModules[moduleId].exports; 46 | /******/ } 47 | /******/ // Create a new module (and put it into the cache) 48 | /******/ var module = installedModules[moduleId] = { 49 | /******/ i: moduleId, 50 | /******/ l: false, 51 | /******/ exports: {} 52 | /******/ }; 53 | /******/ 54 | /******/ // Execute the module function 55 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 56 | /******/ 57 | /******/ // Flag the module as loaded 58 | /******/ module.l = true; 59 | /******/ 60 | /******/ // Return the exports of the module 61 | /******/ return module.exports; 62 | /******/ } 63 | /******/ 64 | /******/ // This file contains only the entry chunk. 65 | /******/ // The chunk loading function for additional chunks 66 | /******/ __webpack_require__.e = function requireEnsure(chunkId) { 67 | /******/ var installedChunkData = installedChunks[chunkId]; 68 | /******/ if(installedChunkData === 0) { 69 | /******/ return new Promise(function(resolve) { resolve(); }); 70 | /******/ } 71 | /******/ 72 | /******/ // a Promise means "currently loading". 73 | /******/ if(installedChunkData) { 74 | /******/ return installedChunkData[2]; 75 | /******/ } 76 | /******/ 77 | /******/ // setup Promise in chunk cache 78 | /******/ var promise = new Promise(function(resolve, reject) { 79 | /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; 80 | /******/ }); 81 | /******/ installedChunkData[2] = promise; 82 | /******/ 83 | /******/ // start chunk loading 84 | /******/ var head = document.getElementsByTagName('head')[0]; 85 | /******/ var script = document.createElement('script'); 86 | /******/ script.type = 'text/javascript'; 87 | /******/ script.charset = 'utf-8'; 88 | /******/ script.async = true; 89 | /******/ script.timeout = 120000; 90 | /******/ 91 | /******/ if (__webpack_require__.nc) { 92 | /******/ script.setAttribute("nonce", __webpack_require__.nc); 93 | /******/ } 94 | /******/ script.src = __webpack_require__.p + "" + chunkId + ".chunk.js"; 95 | /******/ var timeout = setTimeout(onScriptComplete, 120000); 96 | /******/ script.onerror = script.onload = onScriptComplete; 97 | /******/ function onScriptComplete() { 98 | /******/ // avoid mem leaks in IE. 99 | /******/ script.onerror = script.onload = null; 100 | /******/ clearTimeout(timeout); 101 | /******/ var chunk = installedChunks[chunkId]; 102 | /******/ if(chunk !== 0) { 103 | /******/ if(chunk) { 104 | /******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.')); 105 | /******/ } 106 | /******/ installedChunks[chunkId] = undefined; 107 | /******/ } 108 | /******/ }; 109 | /******/ head.appendChild(script); 110 | /******/ 111 | /******/ return promise; 112 | /******/ }; 113 | /******/ 114 | /******/ // expose the modules object (__webpack_modules__) 115 | /******/ __webpack_require__.m = modules; 116 | /******/ 117 | /******/ // expose the module cache 118 | /******/ __webpack_require__.c = installedModules; 119 | /******/ 120 | /******/ // define getter function for harmony exports 121 | /******/ __webpack_require__.d = function(exports, name, getter) { 122 | /******/ if(!__webpack_require__.o(exports, name)) { 123 | /******/ Object.defineProperty(exports, name, { 124 | /******/ configurable: false, 125 | /******/ enumerable: true, 126 | /******/ get: getter 127 | /******/ }); 128 | /******/ } 129 | /******/ }; 130 | /******/ 131 | /******/ // getDefaultExport function for compatibility with non-harmony modules 132 | /******/ __webpack_require__.n = function(module) { 133 | /******/ var getter = module && module.__esModule ? 134 | /******/ function getDefault() { return module['default']; } : 135 | /******/ function getModuleExports() { return module; }; 136 | /******/ __webpack_require__.d(getter, 'a', getter); 137 | /******/ return getter; 138 | /******/ }; 139 | /******/ 140 | /******/ // Object.prototype.hasOwnProperty.call 141 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 142 | /******/ 143 | /******/ // __webpack_public_path__ 144 | /******/ __webpack_require__.p = ""; 145 | /******/ 146 | /******/ // on error function for async loading 147 | /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; 148 | /******/ }) 149 | /************************************************************************/ 150 | /******/ ([]); 151 | //# sourceMappingURL=inline.bundle.js.map -------------------------------------------------------------------------------- /src/main/resources/static/inline.bundle.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack/bootstrap 37882d11ed1b3f840197"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kDAA0C,WAAW,EAAE;AACvD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA,kDAA0C,oBAAoB,WAAW","file":"inline.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t\"inline\": 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData === 0) {\n \t\t\treturn new Promise(function(resolve) { resolve(); });\n \t\t}\n\n \t\t// a Promise means \"currently loading\".\n \t\tif(installedChunkData) {\n \t\t\treturn installedChunkData[2];\n \t\t}\n\n \t\t// setup Promise in chunk cache\n \t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t});\n \t\tinstalledChunkData[2] = promise;\n\n \t\t// start chunk loading\n \t\tvar head = document.getElementsByTagName('head')[0];\n \t\tvar script = document.createElement('script');\n \t\tscript.type = 'text/javascript';\n \t\tscript.charset = 'utf-8';\n \t\tscript.async = true;\n \t\tscript.timeout = 120000;\n\n \t\tif (__webpack_require__.nc) {\n \t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t}\n \t\tscript.src = __webpack_require__.p + \"\" + chunkId + \".chunk.js\";\n \t\tvar timeout = setTimeout(onScriptComplete, 120000);\n \t\tscript.onerror = script.onload = onScriptComplete;\n \t\tfunction onScriptComplete() {\n \t\t\t// avoid mem leaks in IE.\n \t\t\tscript.onerror = script.onload = null;\n \t\t\tclearTimeout(timeout);\n \t\t\tvar chunk = installedChunks[chunkId];\n \t\t\tif(chunk !== 0) {\n \t\t\t\tif(chunk) {\n \t\t\t\t\tchunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\n \t\t\t\t}\n \t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t}\n \t\t};\n \t\thead.appendChild(script);\n\n \t\treturn promise;\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 37882d11ed1b3f840197"],"sourceRoot":"webpack:///"} -------------------------------------------------------------------------------- /src/main/resources/static/main.bundle.js: -------------------------------------------------------------------------------- 1 | webpackJsonp(["main"],{ 2 | 3 | /***/ "../../../../../src/$$_lazy_route_resource lazy recursive": 4 | /***/ (function(module, exports) { 5 | 6 | function webpackEmptyAsyncContext(req) { 7 | // Here Promise.resolve().then() is used instead of new Promise() to prevent 8 | // uncatched exception popping up in devtools 9 | return Promise.resolve().then(function() { 10 | throw new Error("Cannot find module '" + req + "'."); 11 | }); 12 | } 13 | webpackEmptyAsyncContext.keys = function() { return []; }; 14 | webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext; 15 | module.exports = webpackEmptyAsyncContext; 16 | webpackEmptyAsyncContext.id = "../../../../../src/$$_lazy_route_resource lazy recursive"; 17 | 18 | /***/ }), 19 | 20 | /***/ "../../../../../src/app/app.component.css": 21 | /***/ (function(module, exports, __webpack_require__) { 22 | 23 | exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); 24 | // imports 25 | 26 | 27 | // module 28 | exports.push([module.i, "", ""]); 29 | 30 | // exports 31 | 32 | 33 | /*** EXPORTS FROM exports-loader ***/ 34 | module.exports = module.exports.toString(); 35 | 36 | /***/ }), 37 | 38 | /***/ "../../../../../src/app/app.component.html": 39 | /***/ (function(module, exports) { 40 | 41 | module.exports = "\n" 42 | 43 | /***/ }), 44 | 45 | /***/ "../../../../../src/app/app.component.ts": 46 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 47 | 48 | "use strict"; 49 | /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppComponent; }); 50 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); 51 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 52 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 53 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 54 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 55 | return c > 3 && r && Object.defineProperty(target, key, r), r; 56 | }; 57 | 58 | var AppComponent = (function () { 59 | function AppComponent() { 60 | this.title = 'app'; 61 | } 62 | AppComponent = __decorate([ 63 | Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ 64 | selector: 'app-root', 65 | template: __webpack_require__("../../../../../src/app/app.component.html"), 66 | styles: [__webpack_require__("../../../../../src/app/app.component.css")] 67 | }) 68 | ], AppComponent); 69 | return AppComponent; 70 | }()); 71 | 72 | 73 | 74 | /***/ }), 75 | 76 | /***/ "../../../../../src/app/app.module.ts": 77 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 78 | 79 | "use strict"; 80 | /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppModule; }); 81 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__("../../../platform-browser/esm5/platform-browser.js"); 82 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); 83 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_forms__ = __webpack_require__("../../../forms/esm5/forms.js"); 84 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__angular_common_http__ = __webpack_require__("../../../common/esm5/http.js"); 85 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); 86 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app_component__ = __webpack_require__("../../../../../src/app/app.component.ts"); 87 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__contact_contact_component__ = __webpack_require__("../../../../../src/app/contact/contact.component.ts"); 88 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__contact_detail_contact_detail_component__ = __webpack_require__("../../../../../src/app/contact-detail/contact-detail.component.ts"); 89 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__contact_create_contact_create_component__ = __webpack_require__("../../../../../src/app/contact-create/contact-create.component.ts"); 90 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__contact_edit_contact_edit_component__ = __webpack_require__("../../../../../src/app/contact-edit/contact-edit.component.ts"); 91 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 92 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 93 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 94 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 95 | return c > 3 && r && Object.defineProperty(target, key, r), r; 96 | }; 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | var appRoutes = [ 108 | { 109 | path: 'contact', 110 | component: __WEBPACK_IMPORTED_MODULE_6__contact_contact_component__["a" /* ContactComponent */], 111 | data: { title: 'Contact List' } 112 | }, 113 | { 114 | path: 'contact-detail/:id', 115 | component: __WEBPACK_IMPORTED_MODULE_7__contact_detail_contact_detail_component__["a" /* ContactDetailComponent */], 116 | data: { title: 'Contact Details' } 117 | }, 118 | { 119 | path: 'contact-create', 120 | component: __WEBPACK_IMPORTED_MODULE_8__contact_create_contact_create_component__["a" /* ContactCreateComponent */], 121 | data: { title: 'Create Contact' } 122 | }, 123 | { 124 | path: 'contact-edit/:id', 125 | component: __WEBPACK_IMPORTED_MODULE_9__contact_edit_contact_edit_component__["a" /* ContactEditComponent */], 126 | data: { title: 'Edit Contact' } 127 | }, 128 | { path: '', 129 | redirectTo: '/contact', 130 | pathMatch: 'full' 131 | } 132 | ]; 133 | var AppModule = (function () { 134 | function AppModule() { 135 | } 136 | AppModule = __decorate([ 137 | Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["I" /* NgModule */])({ 138 | declarations: [ 139 | __WEBPACK_IMPORTED_MODULE_5__app_component__["a" /* AppComponent */], 140 | __WEBPACK_IMPORTED_MODULE_6__contact_contact_component__["a" /* ContactComponent */], 141 | __WEBPACK_IMPORTED_MODULE_7__contact_detail_contact_detail_component__["a" /* ContactDetailComponent */], 142 | __WEBPACK_IMPORTED_MODULE_8__contact_create_contact_create_component__["a" /* ContactCreateComponent */], 143 | __WEBPACK_IMPORTED_MODULE_9__contact_edit_contact_edit_component__["a" /* ContactEditComponent */] 144 | ], 145 | imports: [ 146 | __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__["a" /* BrowserModule */], 147 | __WEBPACK_IMPORTED_MODULE_2__angular_forms__["a" /* FormsModule */], 148 | __WEBPACK_IMPORTED_MODULE_3__angular_common_http__["b" /* HttpClientModule */], 149 | __WEBPACK_IMPORTED_MODULE_4__angular_router__["c" /* RouterModule */].forRoot(appRoutes, { enableTracing: true } // <-- debugging purposes only 150 | ) 151 | ], 152 | providers: [], 153 | bootstrap: [__WEBPACK_IMPORTED_MODULE_5__app_component__["a" /* AppComponent */]] 154 | }) 155 | ], AppModule); 156 | return AppModule; 157 | }()); 158 | 159 | 160 | 161 | /***/ }), 162 | 163 | /***/ "../../../../../src/app/contact-create/contact-create.component.css": 164 | /***/ (function(module, exports, __webpack_require__) { 165 | 166 | exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); 167 | // imports 168 | 169 | 170 | // module 171 | exports.push([module.i, "", ""]); 172 | 173 | // exports 174 | 175 | 176 | /*** EXPORTS FROM exports-loader ***/ 177 | module.exports = module.exports.toString(); 178 | 179 | /***/ }), 180 | 181 | /***/ "../../../../../src/app/contact-create/contact-create.component.html": 182 | /***/ (function(module, exports) { 183 | 184 | module.exports = "
\n

Add New Contact

\n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n
\n
\n
\n
\n
\n" 185 | 186 | /***/ }), 187 | 188 | /***/ "../../../../../src/app/contact-create/contact-create.component.ts": 189 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 190 | 191 | "use strict"; 192 | /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ContactCreateComponent; }); 193 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); 194 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); 195 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_common_http__ = __webpack_require__("../../../common/esm5/http.js"); 196 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 197 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 198 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 199 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 200 | return c > 3 && r && Object.defineProperty(target, key, r), r; 201 | }; 202 | var __metadata = (this && this.__metadata) || function (k, v) { 203 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 204 | }; 205 | 206 | 207 | 208 | var ContactCreateComponent = (function () { 209 | function ContactCreateComponent(http, router) { 210 | this.http = http; 211 | this.router = router; 212 | this.contact = {}; 213 | } 214 | ContactCreateComponent.prototype.ngOnInit = function () { 215 | }; 216 | ContactCreateComponent.prototype.saveContact = function () { 217 | var _this = this; 218 | this.http.post('/contacts', this.contact) 219 | .subscribe(function (res) { 220 | console.log(res); 221 | _this.router.navigate(['/contact-detail', res['id']]); 222 | }, function (err) { 223 | console.log(err); 224 | }); 225 | }; 226 | ContactCreateComponent = __decorate([ 227 | Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ 228 | selector: 'app-contact-create', 229 | template: __webpack_require__("../../../../../src/app/contact-create/contact-create.component.html"), 230 | styles: [__webpack_require__("../../../../../src/app/contact-create/contact-create.component.css")] 231 | }), 232 | __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2__angular_common_http__["a" /* HttpClient */], __WEBPACK_IMPORTED_MODULE_1__angular_router__["b" /* Router */]]) 233 | ], ContactCreateComponent); 234 | return ContactCreateComponent; 235 | }()); 236 | 237 | 238 | 239 | /***/ }), 240 | 241 | /***/ "../../../../../src/app/contact-detail/contact-detail.component.css": 242 | /***/ (function(module, exports, __webpack_require__) { 243 | 244 | exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); 245 | // imports 246 | 247 | 248 | // module 249 | exports.push([module.i, "", ""]); 250 | 251 | // exports 252 | 253 | 254 | /*** EXPORTS FROM exports-loader ***/ 255 | module.exports = module.exports.toString(); 256 | 257 | /***/ }), 258 | 259 | /***/ "../../../../../src/app/contact-detail/contact-detail.component.html": 260 | /***/ (function(module, exports) { 261 | 262 | module.exports = "
\n

{{ contact.name }}

\n
\n
Address
\n
{{ contact.address }}
\n
City
\n
{{ contact.city }}
\n
Phone
\n
{{ contact.phone }}
\n
Email
\n
{{ contact.email }}
\n
\n
\n
\n EDIT\n \n
\n
\n
\n" 263 | 264 | /***/ }), 265 | 266 | /***/ "../../../../../src/app/contact-detail/contact-detail.component.ts": 267 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 268 | 269 | "use strict"; 270 | /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ContactDetailComponent; }); 271 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); 272 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common_http__ = __webpack_require__("../../../common/esm5/http.js"); 273 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); 274 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 275 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 276 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 277 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 278 | return c > 3 && r && Object.defineProperty(target, key, r), r; 279 | }; 280 | var __metadata = (this && this.__metadata) || function (k, v) { 281 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 282 | }; 283 | 284 | 285 | 286 | var ContactDetailComponent = (function () { 287 | function ContactDetailComponent(router, route, http) { 288 | this.router = router; 289 | this.route = route; 290 | this.http = http; 291 | this.contact = {}; 292 | } 293 | ContactDetailComponent.prototype.ngOnInit = function () { 294 | this.getContactDetail(this.route.snapshot.params['id']); 295 | }; 296 | ContactDetailComponent.prototype.getContactDetail = function (id) { 297 | var _this = this; 298 | this.http.get('/contacts/' + id).subscribe(function (data) { 299 | _this.contact = data; 300 | }); 301 | }; 302 | ContactDetailComponent.prototype.deleteContact = function (id) { 303 | var _this = this; 304 | this.http.delete('/contacts/' + id) 305 | .subscribe(function (res) { 306 | _this.router.navigate(['/contact']); 307 | }, function (err) { 308 | console.log(err); 309 | }); 310 | }; 311 | ContactDetailComponent = __decorate([ 312 | Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ 313 | selector: 'app-contact-detail', 314 | template: __webpack_require__("../../../../../src/app/contact-detail/contact-detail.component.html"), 315 | styles: [__webpack_require__("../../../../../src/app/contact-detail/contact-detail.component.css")] 316 | }), 317 | __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2__angular_router__["b" /* Router */], __WEBPACK_IMPORTED_MODULE_2__angular_router__["a" /* ActivatedRoute */], __WEBPACK_IMPORTED_MODULE_1__angular_common_http__["a" /* HttpClient */]]) 318 | ], ContactDetailComponent); 319 | return ContactDetailComponent; 320 | }()); 321 | 322 | 323 | 324 | /***/ }), 325 | 326 | /***/ "../../../../../src/app/contact-edit/contact-edit.component.css": 327 | /***/ (function(module, exports, __webpack_require__) { 328 | 329 | exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); 330 | // imports 331 | 332 | 333 | // module 334 | exports.push([module.i, "", ""]); 335 | 336 | // exports 337 | 338 | 339 | /*** EXPORTS FROM exports-loader ***/ 340 | module.exports = module.exports.toString(); 341 | 342 | /***/ }), 343 | 344 | /***/ "../../../../../src/app/contact-edit/contact-edit.component.html": 345 | /***/ (function(module, exports) { 346 | 347 | module.exports = "
\n

Edit Contact

\n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n
\n
\n
\n
\n
\n" 348 | 349 | /***/ }), 350 | 351 | /***/ "../../../../../src/app/contact-edit/contact-edit.component.ts": 352 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 353 | 354 | "use strict"; 355 | /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ContactEditComponent; }); 356 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); 357 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_router__ = __webpack_require__("../../../router/esm5/router.js"); 358 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_common_http__ = __webpack_require__("../../../common/esm5/http.js"); 359 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 360 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 361 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 362 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 363 | return c > 3 && r && Object.defineProperty(target, key, r), r; 364 | }; 365 | var __metadata = (this && this.__metadata) || function (k, v) { 366 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 367 | }; 368 | 369 | 370 | 371 | var ContactEditComponent = (function () { 372 | function ContactEditComponent(http, router, route) { 373 | this.http = http; 374 | this.router = router; 375 | this.route = route; 376 | this.contact = {}; 377 | } 378 | ContactEditComponent.prototype.ngOnInit = function () { 379 | this.getContact(this.route.snapshot.params['id']); 380 | }; 381 | ContactEditComponent.prototype.getContact = function (id) { 382 | var _this = this; 383 | this.http.get('/contacts/' + id).subscribe(function (data) { 384 | _this.contact = data; 385 | }); 386 | }; 387 | ContactEditComponent.prototype.updateContact = function (id) { 388 | var _this = this; 389 | this.http.put('/contacts/' + id, this.contact) 390 | .subscribe(function (res) { 391 | _this.router.navigate(['/contact-detail', res['id']]); 392 | }, function (err) { 393 | console.log(err); 394 | }); 395 | }; 396 | ContactEditComponent = __decorate([ 397 | Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ 398 | selector: 'app-contact-edit', 399 | template: __webpack_require__("../../../../../src/app/contact-edit/contact-edit.component.html"), 400 | styles: [__webpack_require__("../../../../../src/app/contact-edit/contact-edit.component.css")] 401 | }), 402 | __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_2__angular_common_http__["a" /* HttpClient */], __WEBPACK_IMPORTED_MODULE_1__angular_router__["b" /* Router */], __WEBPACK_IMPORTED_MODULE_1__angular_router__["a" /* ActivatedRoute */]]) 403 | ], ContactEditComponent); 404 | return ContactEditComponent; 405 | }()); 406 | 407 | 408 | 409 | /***/ }), 410 | 411 | /***/ "../../../../../src/app/contact/contact.component.css": 412 | /***/ (function(module, exports, __webpack_require__) { 413 | 414 | exports = module.exports = __webpack_require__("../../../../css-loader/lib/css-base.js")(false); 415 | // imports 416 | 417 | 418 | // module 419 | exports.push([module.i, "", ""]); 420 | 421 | // exports 422 | 423 | 424 | /*** EXPORTS FROM exports-loader ***/ 425 | module.exports = module.exports.toString(); 426 | 427 | /***/ }), 428 | 429 | /***/ "../../../../../src/app/contact/contact.component.html": 430 | /***/ (function(module, exports) { 431 | 432 | module.exports = "
\n

Contact List\n \n \n \n

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameCityEmailAction
{{ contact.name }}{{ contact.city }}{{ contact.email }}Show Detail
\n
\n" 433 | 434 | /***/ }), 435 | 436 | /***/ "../../../../../src/app/contact/contact.component.ts": 437 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 438 | 439 | "use strict"; 440 | /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ContactComponent; }); 441 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); 442 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common_http__ = __webpack_require__("../../../common/esm5/http.js"); 443 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 444 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 445 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 446 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 447 | return c > 3 && r && Object.defineProperty(target, key, r), r; 448 | }; 449 | var __metadata = (this && this.__metadata) || function (k, v) { 450 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 451 | }; 452 | 453 | 454 | var ContactComponent = (function () { 455 | function ContactComponent(http) { 456 | this.http = http; 457 | } 458 | ContactComponent.prototype.ngOnInit = function () { 459 | var _this = this; 460 | this.http.get('/contacts').subscribe(function (data) { 461 | _this.contacts = data; 462 | }); 463 | }; 464 | ContactComponent = __decorate([ 465 | Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["n" /* Component */])({ 466 | selector: 'app-contact', 467 | template: __webpack_require__("../../../../../src/app/contact/contact.component.html"), 468 | styles: [__webpack_require__("../../../../../src/app/contact/contact.component.css")] 469 | }), 470 | __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1__angular_common_http__["a" /* HttpClient */]]) 471 | ], ContactComponent); 472 | return ContactComponent; 473 | }()); 474 | 475 | 476 | 477 | /***/ }), 478 | 479 | /***/ "../../../../../src/environments/environment.ts": 480 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 481 | 482 | "use strict"; 483 | /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return environment; }); 484 | // The file contents for the current environment will overwrite these during build. 485 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 486 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 487 | // The list of which env maps to which file can be found in `.angular-cli.json`. 488 | var environment = { 489 | production: false 490 | }; 491 | 492 | 493 | /***/ }), 494 | 495 | /***/ "../../../../../src/main.ts": 496 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 497 | 498 | "use strict"; 499 | Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 500 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__("../../../core/esm5/core.js"); 501 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_platform_browser_dynamic__ = __webpack_require__("../../../platform-browser-dynamic/esm5/platform-browser-dynamic.js"); 502 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__app_app_module__ = __webpack_require__("../../../../../src/app/app.module.ts"); 503 | /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__environments_environment__ = __webpack_require__("../../../../../src/environments/environment.ts"); 504 | 505 | 506 | 507 | 508 | if (__WEBPACK_IMPORTED_MODULE_3__environments_environment__["a" /* environment */].production) { 509 | Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_13" /* enableProdMode */])(); 510 | } 511 | Object(__WEBPACK_IMPORTED_MODULE_1__angular_platform_browser_dynamic__["a" /* platformBrowserDynamic */])().bootstrapModule(__WEBPACK_IMPORTED_MODULE_2__app_app_module__["a" /* AppModule */]) 512 | .catch(function (err) { return console.log(err); }); 513 | 514 | 515 | /***/ }), 516 | 517 | /***/ 0: 518 | /***/ (function(module, exports, __webpack_require__) { 519 | 520 | module.exports = __webpack_require__("../../../../../src/main.ts"); 521 | 522 | 523 | /***/ }) 524 | 525 | },[0]); 526 | //# sourceMappingURL=main.bundle.js.map -------------------------------------------------------------------------------- /src/main/resources/static/main.bundle.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["/Users/didin/Documents/workspace/angular/frontend/src/$_lazy_route_resource lazy","/Users/didin/Documents/workspace/angular/frontend/src/app/app.component.css","/Users/didin/Documents/workspace/angular/frontend/src/app/app.component.html","/Users/didin/Documents/workspace/angular/frontend/src/app/app.component.ts","/Users/didin/Documents/workspace/angular/frontend/src/app/app.module.ts","/Users/didin/Documents/workspace/angular/frontend/src/app/contact-create/contact-create.component.css","/Users/didin/Documents/workspace/angular/frontend/src/app/contact-create/contact-create.component.html","/Users/didin/Documents/workspace/angular/frontend/src/app/contact-create/contact-create.component.ts","/Users/didin/Documents/workspace/angular/frontend/src/app/contact-detail/contact-detail.component.css","/Users/didin/Documents/workspace/angular/frontend/src/app/contact-detail/contact-detail.component.html","/Users/didin/Documents/workspace/angular/frontend/src/app/contact-detail/contact-detail.component.ts","/Users/didin/Documents/workspace/angular/frontend/src/app/contact-edit/contact-edit.component.css","/Users/didin/Documents/workspace/angular/frontend/src/app/contact-edit/contact-edit.component.html","/Users/didin/Documents/workspace/angular/frontend/src/app/contact-edit/contact-edit.component.ts","/Users/didin/Documents/workspace/angular/frontend/src/app/contact/contact.component.css","/Users/didin/Documents/workspace/angular/frontend/src/app/contact/contact.component.html","/Users/didin/Documents/workspace/angular/frontend/src/app/contact/contact.component.ts","/Users/didin/Documents/workspace/angular/frontend/src/environments/environment.ts","/Users/didin/Documents/workspace/angular/frontend/src/main.ts"],"names":[],"mappings":"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","file":"main.bundle.js","sourcesContent":["function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncatched exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"../../../../../src/$$_lazy_route_resource lazy recursive\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/didin/Documents/workspace/angular/frontend/src/$$_lazy_route_resource lazy\n// module id = ../../../../../src/$$_lazy_route_resource lazy recursive\n// module chunks = main","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/didin/Documents/workspace/angular/frontend/src/app/app.component.css\n// module id = ../../../../../src/app/app.component.css\n// module chunks = main","module.exports = \"\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/didin/Documents/workspace/angular/frontend/src/app/app.component.html\n// module id = ../../../../../src/app/app.component.html\n// module chunks = main","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.css']\n})\nexport class AppComponent {\n title = 'app';\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/didin/Documents/workspace/angular/frontend/src/app/app.component.ts","import { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { HttpClientModule } from '@angular/common/http';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { AppComponent } from './app.component';\nimport { ContactComponent } from './contact/contact.component';\nimport { ContactDetailComponent } from './contact-detail/contact-detail.component';\nimport { ContactCreateComponent } from './contact-create/contact-create.component';\nimport { ContactEditComponent } from './contact-edit/contact-edit.component';\n\nconst appRoutes: Routes = [\n {\n path: 'contact',\n component: ContactComponent,\n data: { title: 'Contact List' }\n },\n {\n path: 'contact-detail/:id',\n component: ContactDetailComponent,\n data: { title: 'Contact Details' }\n },\n {\n path: 'contact-create',\n component: ContactCreateComponent,\n data: { title: 'Create Contact' }\n },\n {\n path: 'contact-edit/:id',\n component: ContactEditComponent,\n data: { title: 'Edit Contact' }\n },\n { path: '',\n redirectTo: '/contact',\n pathMatch: 'full'\n }\n];\n\n@NgModule({\n declarations: [\n AppComponent,\n ContactComponent,\n ContactDetailComponent,\n ContactCreateComponent,\n ContactEditComponent\n ],\n imports: [\n BrowserModule,\n FormsModule,\n HttpClientModule,\n RouterModule.forRoot(\n appRoutes,\n { enableTracing: true } // <-- debugging purposes only\n )\n ],\n providers: [],\n bootstrap: [AppComponent]\n})\nexport class AppModule { }\n\n\n\n// WEBPACK FOOTER //\n// /Users/didin/Documents/workspace/angular/frontend/src/app/app.module.ts","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/didin/Documents/workspace/angular/frontend/src/app/contact-create/contact-create.component.css\n// module id = ../../../../../src/app/contact-create/contact-create.component.css\n// module chunks = main","module.exports = \"
\\n

Add New Contact

\\n
\\n
\\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n \\n
\\n
\\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/didin/Documents/workspace/angular/frontend/src/app/contact-create/contact-create.component.html\n// module id = ../../../../../src/app/contact-create/contact-create.component.html\n// module chunks = main","import { Component, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { HttpClient } from '@angular/common/http';\n\n@Component({\n selector: 'app-contact-create',\n templateUrl: './contact-create.component.html',\n styleUrls: ['./contact-create.component.css']\n})\nexport class ContactCreateComponent implements OnInit {\n\n contact = {};\n\n constructor(private http: HttpClient, private router: Router) { }\n\n ngOnInit() {\n }\n\n saveContact() {\n this.http.post('/contacts', this.contact)\n .subscribe(res => {\n console.log(res);\n this.router.navigate(['/contact-detail', res['id']]);\n }, (err) => {\n console.log(err);\n }\n );\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/didin/Documents/workspace/angular/frontend/src/app/contact-create/contact-create.component.ts","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/didin/Documents/workspace/angular/frontend/src/app/contact-detail/contact-detail.component.css\n// module id = ../../../../../src/app/contact-detail/contact-detail.component.css\n// module chunks = main","module.exports = \"
\\n

{{ contact.name }}

\\n
\\n
Address
\\n
{{ contact.address }}
\\n
City
\\n
{{ contact.city }}
\\n
Phone
\\n
{{ contact.phone }}
\\n
Email
\\n
{{ contact.email }}
\\n
\\n
\\n
\\n EDIT\\n \\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/didin/Documents/workspace/angular/frontend/src/app/contact-detail/contact-detail.component.html\n// module id = ../../../../../src/app/contact-detail/contact-detail.component.html\n// module chunks = main","import { Component, OnInit } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { ActivatedRoute, Router } from '@angular/router';\n\n@Component({\n selector: 'app-contact-detail',\n templateUrl: './contact-detail.component.html',\n styleUrls: ['./contact-detail.component.css']\n})\nexport class ContactDetailComponent implements OnInit {\n\n contact = {};\n\n constructor(private router: Router, private route: ActivatedRoute, private http: HttpClient) { }\n\n ngOnInit() {\n this.getContactDetail(this.route.snapshot.params['id']);\n }\n\n getContactDetail(id) {\n this.http.get('/contacts/'+id).subscribe(data => {\n this.contact = data;\n });\n }\n\n deleteContact(id) {\n this.http.delete('/contacts/'+id)\n .subscribe(res => {\n this.router.navigate(['/contact']);\n }, (err) => {\n console.log(err);\n }\n );\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/didin/Documents/workspace/angular/frontend/src/app/contact-detail/contact-detail.component.ts","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/didin/Documents/workspace/angular/frontend/src/app/contact-edit/contact-edit.component.css\n// module id = ../../../../../src/app/contact-edit/contact-edit.component.css\n// module chunks = main","module.exports = \"
\\n

Edit Contact

\\n
\\n
\\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n \\n
\\n
\\n
\\n
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/didin/Documents/workspace/angular/frontend/src/app/contact-edit/contact-edit.component.html\n// module id = ../../../../../src/app/contact-edit/contact-edit.component.html\n// module chunks = main","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { HttpClient } from '@angular/common/http';\n\n@Component({\n selector: 'app-contact-edit',\n templateUrl: './contact-edit.component.html',\n styleUrls: ['./contact-edit.component.css']\n})\nexport class ContactEditComponent implements OnInit {\n\n contact = {};\n\n constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute) { }\n\n ngOnInit() {\n this.getContact(this.route.snapshot.params['id']);\n }\n\n getContact(id) {\n this.http.get('/contacts/'+id).subscribe(data => {\n this.contact = data;\n });\n }\n\n updateContact(id) {\n this.http.put('/contacts/'+id, this.contact)\n .subscribe(res => {\n this.router.navigate(['/contact-detail', res['id']]);\n }, (err) => {\n console.log(err);\n }\n );\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/didin/Documents/workspace/angular/frontend/src/app/contact-edit/contact-edit.component.ts","exports = module.exports = require(\"../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = module.exports.toString();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/didin/Documents/workspace/angular/frontend/src/app/contact/contact.component.css\n// module id = ../../../../../src/app/contact/contact.component.css\n// module chunks = main","module.exports = \"
\\n

Contact List\\n \\n \\n \\n

\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
NameCityEmailAction
{{ contact.name }}{{ contact.city }}{{ contact.email }}Show Detail
\\n
\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// /Users/didin/Documents/workspace/angular/frontend/src/app/contact/contact.component.html\n// module id = ../../../../../src/app/contact/contact.component.html\n// module chunks = main","import { Component, OnInit } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\n@Component({\n selector: 'app-contact',\n templateUrl: './contact.component.html',\n styleUrls: ['./contact.component.css']\n})\nexport class ContactComponent implements OnInit {\n\n contacts: any;\n\n constructor(private http: HttpClient) { }\n\n ngOnInit() {\n this.http.get('/contacts').subscribe(data => {\n this.contacts = data;\n });\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// /Users/didin/Documents/workspace/angular/frontend/src/app/contact/contact.component.ts","// The file contents for the current environment will overwrite these during build.\n// The build system defaults to the dev environment which uses `environment.ts`, but if you do\n// `ng build --env=prod` then `environment.prod.ts` will be used instead.\n// The list of which env maps to which file can be found in `.angular-cli.json`.\n\nexport const environment = {\n production: false\n};\n\n\n\n// WEBPACK FOOTER //\n// /Users/didin/Documents/workspace/angular/frontend/src/environments/environment.ts","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.log(err));\n\n\n\n// WEBPACK FOOTER //\n// /Users/didin/Documents/workspace/angular/frontend/src/main.ts"],"sourceRoot":"webpack:///"} -------------------------------------------------------------------------------- /src/main/resources/static/styles.bundle.js: -------------------------------------------------------------------------------- 1 | webpackJsonp(["styles"],{ 2 | 3 | /***/ "../../../../../src/styles.css": 4 | /***/ (function(module, exports, __webpack_require__) { 5 | 6 | // style-loader: Adds some css to the DOM by adding a