Private/Angular/Service/New-NgStringService.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Function New-NgStringService([SolnInfo]$solnInfo)
{
    # Save output to desired folder
    [string]$angularStringServiceFileName = "$($webCsprojInfo.angularServiceDir)\string.service.ts"
    Write-Output "### Create string service for $angularStringServiceFileName"
    New-NgStringServiceTsToString $solnInfo | Out-FileUtf8NoBom $angularStringServiceFileName

    # Add import to app.module
    Write-Output "### Add service StringService to app.module.ts"    
    Edit-NgModuleAddService $webCsprojInfo "StringService" "./service/string.service"
}