Actually I am working alongside without SharePoint with Pnp Js Rest Api . I am hosting the bundled files on SharePoint itself.. When i do ng build --watch its observing the changes but isn't reflected on the html files after build..
Asked
Active
Viewed 508 times
2 Answers
1
You need to run
ng build --watch=true
or
ng b --watch=true
The default is false

Miroslav Glamuzina
- 4,472
- 2
- 19
- 33

dota2pro
- 7,220
- 7
- 44
- 79
-
Its not working. It serves the previous html file that was created at the start of the project. The ng build --watch= true also does the same as ng build --watch. No changes seen so far. – suriya prakash May 07 '19 at 14:54
-
@suriyaprakash try this https://stackoverflow.com/questions/54816109/angular-7-library-html-template-changes-are-not-affected-into-application-when-c and can you also post your angular.json ? – dota2pro May 07 '19 at 15:07
-
https://raw.githubusercontent.com/suryarsp/SnacksPicker/master/angular.json?token=AFALO5KACI236VGACNVL63C42HB4S @dota2pro – suriya prakash May 07 '19 at 17:48
-
@suriyaprakash the link you posted gives me a 404 error – dota2pro May 07 '19 at 18:18
0
My angular.json file @dota2pro
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"Office365Test": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "Office",
"schematics": {
"@schematics/angular:class": {
"spec": false
},
"@schematics/angular:component": {
"spec": false
},
"@schematics/angular:directive": {
"spec": false
},
"@schematics/angular:guard": {
"spec": false
},
"@schematics/angular:module": {
"spec": false
},
"@schematics/angular:pipe": {
"spec": false
},
"@schematics/angular:service": {
"spec": false
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/Office365Test",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/ngx-toastr/toastr.css",
"src/styles.css",
"src/assets/styles/styles.css",
"src/assets/styles/app.scss"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "Office365Test:build"
},
"configurations": {
"production": {
"browserTarget": "Office365Test:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "Office365Test:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.css"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"Office365Test-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "Office365Test:serve"
},
"configurations": {
"production": {
"devServerTarget": "Office365Test:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "Office365Test"
}

suriya prakash
- 47
- 5