Index

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/angular/ast-utils.ts

addBootstrapToModule
addBootstrapToModule(source, modulePath, classifiedName, importPath)

Custom function to insert an export into NgModule. It also imports it.

Parameters :
Name Optional
source No
modulePath No
classifiedName No
importPath No
Returns : Change[]
addDeclarationToModule
addDeclarationToModule(source, modulePath, classifiedName, importPath)

Custom function to insert a declaration (component, pipe, directive) into NgModule declarations. It also imports the component.

Parameters :
Name Optional
source No
modulePath No
classifiedName No
importPath No
Returns : Change[]
addEntryComponentToModule
addEntryComponentToModule(source, modulePath, classifiedName, importPath)

Custom function to insert an entryComponent into NgModule. It also imports it.

Parameters :
Name Optional
source No
modulePath No
classifiedName No
importPath No
Returns : Change[]
addExportToModule
addExportToModule(source, modulePath, classifiedName, importPath)

Custom function to insert an export into NgModule. It also imports it.

Parameters :
Name Optional
source No
modulePath No
classifiedName No
importPath No
Returns : Change[]
addImportToModule
addImportToModule(source, modulePath, classifiedName, importPath)

Custom function to insert an NgModule into NgModule imports. It also imports the module.

Parameters :
Name Optional
source No
modulePath No
classifiedName No
importPath No
Returns : Change[]
addProviderToModule
addProviderToModule(source, modulePath, classifiedName, importPath)

Custom function to insert a provider into NgModule. It also imports it.

Parameters :
Name Optional
source No
modulePath No
classifiedName No
importPath No
Returns : Change[]
addRouteDeclarationToModule
addRouteDeclarationToModule(source, fileToAdd, routeLiteral)

Adds a new route declaration to a router module (i.e. has a RouterModule declaration)

Parameters :
Name Optional
source No
fileToAdd No
routeLiteral No
Returns : Change
addSymbolToNgModuleMetadata
addSymbolToNgModuleMetadata(source, ngModulePath, metadataField, symbolName, importPath)
Parameters :
Name Optional
source No
ngModulePath No
metadataField No
symbolName No
importPath No
Returns : Change[]
findNode
findNode(node, kind, text)
Parameters :
Name Optional
node No
kind No
text No
Returns : ts.Node | null
findNodes
findNodes(node, kind, max, recursive)

Find all nodes from the AST in the subtree of node of SyntaxKind kind.

Parameters :
Name Optional Description
node No
kind No
max No

The maximum number of items to return.

recursive No

Continue looking for nodes of kind recursive until end the last child even when node of kind has been found.

Returns : ts.Node[]

all nodes of kind, or [] if none is found

getContentOfKeyLiteral
getContentOfKeyLiteral(_source, node)
Parameters :
Name Optional
_source No
node No
Returns : string | null
getDecoratorMetadata
getDecoratorMetadata(source, identifier, module)
Parameters :
Name Optional
source No
identifier No
module No
Returns : ts.Node[]
getFirstNgModuleName
getFirstNgModuleName(source)

Given a source file with @NgModule class(es), find the name of the first @NgModule class.

Parameters :
Name Optional Description
source No

source file containing one or more

Returns : string | undefined

the name of the first

getMetadataField
getMetadataField(node, metadataField)
Parameters :
Name Optional
node No
metadataField No
Returns : ts.ObjectLiteralElement[]
getRouterModuleDeclaration
getRouterModuleDeclaration(source)

Returns the RouterModule declaration from NgModule metadata, if any.

Parameters :
Name Optional
source No
Returns : ts.Expression | undefined
getSourceNodes
getSourceNodes(sourceFile)

Get all the nodes from a source.

Parameters :
Name Optional Description
sourceFile No

The source file object.

Returns : ts.Node[]

An observable of all the nodes in the source.

insertAfterLastOccurrence
insertAfterLastOccurrence(nodes, toInsert, file, fallbackPos, syntaxKind?)

Insert toInsert after the last occurence of ts.SyntaxKind[nodes[i].kind] or after the last of occurence of syntaxKind if the last occurence is a sub child of ts.SyntaxKind[nodes[i].kind] and save the changes in file.

Parameters :
Name Optional Description
nodes No

insert after the last occurence of nodes

toInsert No

string to insert

file No

file to insert changes into

fallbackPos No

position to insert if toInsert happens to be the first occurence

syntaxKind Yes

the ts.SyntaxKind of the subchildren to insert after

Returns : Change

Change instance

insertImport
insertImport(source, fileToEdit, symbolName, fileName, isDefault)

Add Import import { symbolName } from fileName if the import doesn't exit already. Assumes fileToEdit can be resolved and accessed.

Parameters :
Name Optional Description
source No
fileToEdit No

(file we want to add import to)

symbolName No

(item to import)

fileName No

(path to the file)

isDefault No

(if true, import follows style for importing default exports)

Returns : Change

Change

isImported
isImported(source, classifiedName, importPath)

Determine if an import already exists.

Parameters :
Name Optional
source No
classifiedName No
importPath No
Returns : boolean

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/material/ast.ts

addModuleImportToModule
addModuleImportToModule(host, modulePath, moduleName, src)

Import and add module to specific module path.

Parameters :
Name Optional Description
host No

the tree we are updating

modulePath No

src location of the module to import

moduleName No

name of module to import

src No

src location to import

addModuleImportToRootModule
addModuleImportToRootModule(host, moduleName, src, project)

Import and add module to root app module.

Parameters :
Name Optional
host No
moduleName No
src No
project No
getSourceFile
getSourceFile(host, path)

Reads file given path and returns TypeScript source file.

Parameters :
Name Optional
host No
path No
Returns : typescript.SourceFile

projects/angular-material-extensions/google-maps-autocomplete/schematics/ng-add/index.ts

addModuleToImports
addModuleToImports(options: any)
Parameters :
Name Type Optional
options any No
Returns : Rule
addPackageJsonDependencies
addPackageJsonDependencies()
Returns : Rule
getPackageVersionFromPackageJson
getPackageVersionFromPackageJson(tree, name)

Gets the version of the specified package by looking at the package.json in the given tree.

Parameters :
Name Optional
tree No
name No
Returns : string | null
installPackageJsonDependencies
installPackageJsonDependencies()
Returns : Rule
loadPackageVersionGracefully
loadPackageVersionGracefully(context)

Loads the full version from the given Angular package gracefully.

Parameters :
Name Optional
context No
Returns : string | null
Unnamed function
Unnamed function(options: any)
Parameters :
Name Type Optional
options any No
Returns : Rule

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/angular/dependencies.ts

addPackageJsonDependency
addPackageJsonDependency(tree, dependency)
Parameters :
Name Optional
tree No
dependency No
Returns : void
getPackageJsonDependency
getPackageJsonDependency(tree, name)
Parameters :
Name Optional
tree No
name No
removePackageJsonDependency
removePackageJsonDependency(tree, name)
Parameters :
Name Optional
tree No
name No
Returns : void

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/material/package-config.ts

addPackageToPackageJson
addPackageToPackageJson(host, pkg, version)

Adds a package to the package.json in the given host tree.

Parameters :
Name Optional
host No
pkg No
version No
Returns : Tree

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/angular/config.ts

addProjectToWorkspace
addProjectToWorkspace(workspace, name, project)
Parameters :
Name Optional
workspace No
name No
project No
Returns : Rule
getAppFromConfig
getAppFromConfig(config, appIndexOrName)
Parameters :
Name Optional
config No
appIndexOrName No
Returns : AppConfig | null
getConfig
getConfig(host)
Parameters :
Name Optional
host No
Returns : CliConfig
getWorkspace
getWorkspace(host)
Parameters :
Name Optional
host No
Returns : WorkspaceSchema
getWorkspacePath
getWorkspacePath(host)
Parameters :
Name Optional
host No
Returns : string
updateWorkspace
updateWorkspace(workspace)
Parameters :
Name Optional
workspace No
Returns : Rule

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/angular/json-utils.ts

appendPropertyInAstObject
appendPropertyInAstObject(recorder, node, propertyName, value, indent)
Parameters :
Name Optional
recorder No
node No
propertyName No
value No
indent No
appendValueInAstArray
appendValueInAstArray(recorder, node, value, indent: number)
Parameters :
Name Type Optional
recorder No
node No
value No
indent number No
findPropertyInAstObject
findPropertyInAstObject(node, propertyName)
Parameters :
Name Optional
node No
propertyName No
Returns : JsonAstNode | null
insertPropertyInAstObjectInOrder
insertPropertyInAstObjectInOrder(recorder, node, propertyName, value, indent)
Parameters :
Name Optional
recorder No
node No
propertyName No
value No
indent No
removePropertyInAstObject
removePropertyInAstObject(recorder, node, propertyName)
Parameters :
Name Optional
recorder No
node No
propertyName No

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/angular/lint-fix.ts

applyLintFix
applyLintFix(path: string)
Parameters :
Name Type Optional
path string No
Returns : Rule

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/material/build-component.ts

buildComponent
buildComponent(options, additionalFiles)

Rule that copies and interpolates the files that belong to this schematic context. Additionally a list of file paths can be passed to this rule in order to expose them inside the EJS template context.

This allows inlining the external template or stylesheet files in EJS without having to manually duplicate the file content.

Parameters :
Name Optional
options No
additionalFiles No
Returns : Rule

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/angular/project.ts

buildDefaultPath
buildDefaultPath(project)

Build a default project path for generating.

Parameters :
Name Optional Description
project No

The project to build the path for.

Returns : string
getProject
getProject(workspaceOrHost, projectName)
Parameters :
Name Optional
workspaceOrHost No
projectName No
isWorkspaceProject
isWorkspaceProject(project: any)
Parameters :
Name Type Optional
project any No
Returns : WorkspaceProject
isWorkspaceSchema
isWorkspaceSchema(workspace: any)
Parameters :
Name Type Optional
workspace any No
Returns : WorkspaceSchema

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/angular/find-module.ts

buildRelativePath
buildRelativePath(from, to)

Build a relative path from one file path to another file path.

Parameters :
Name Optional
from No
to No
Returns : string
findModule
findModule(host, generateDir, moduleExt, routingModuleExt)

Function to find the "closest" module to a generated file's path.

Parameters :
Name Optional
host No
generateDir No
moduleExt No
routingModuleExt No
Returns : Path
findModuleFromOptions
findModuleFromOptions(host, options)

Find the module referred by a set of options passed to the schematics.

Parameters :
Name Optional
host No
options No
Returns : Path | undefined

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/angular/ng-ast-utils.ts

findBootstrapModuleCall
findBootstrapModuleCall(host, mainPath)
Parameters :
Name Optional
host No
mainPath No
Returns : ts.CallExpression | null
findBootstrapModulePath
findBootstrapModulePath(host, mainPath)
Parameters :
Name Optional
host No
mainPath No
Returns : string
getAppModulePath
getAppModulePath(host, mainPath)
Parameters :
Name Optional
host No
mainPath No
Returns : string

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/material/get-project.ts

getProjectFromWorkspace
getProjectFromWorkspace(workspace, projectName?)

Finds the specified project configuration in the workspace. Throws an error if the project couldn't be found.

Parameters :
Name Optional
workspace No
projectName Yes
Returns : WorkspaceProject

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/angular/project-targets.ts

getProjectTargets
getProjectTargets(projectOrHost, projectName: string)
Parameters :
Name Type Optional
projectOrHost No
projectName string No
Returns : WorkspaceTargets
getProjectTargets
getProjectTargets(project)
Parameters :
Name Optional
project No
Returns : WorkspaceTargets
getProjectTargets
getProjectTargets(workspaceOrHost, projectName)
Parameters :
Name Optional
workspaceOrHost No
projectName No
Returns : WorkspaceTargets
targetBuildNotFoundError
targetBuildNotFoundError()

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/material/ast/ng-module-imports.ts

hasNgModuleImport
hasNgModuleImport(tree, modulePath, className)

Whether the Angular module in the given path imports the specified module class name.

Parameters :
Name Optional
tree No
modulePath No
className No
Returns : boolean

projects/angular-material-extensions/google-maps-autocomplete/src/lib/helpers/parser.ts

parseGermanAddress
parseGermanAddress(placeResult)
Parameters :
Name Optional
placeResult No
Returns : GermanAddress

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/angular/parse-name.ts

parseName
parseName(path, name)
Parameters :
Name Optional
path No
name No
Returns : Location

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/angular/paths.ts

relativePathToWorkspaceRoot
relativePathToWorkspaceRoot(projectRoot)
Parameters :
Name Optional
projectRoot No
Returns : string

projects/angular-material-extensions/google-maps-autocomplete/schematics/helpers/angular/validation.ts

validateHtmlSelector
validateHtmlSelector(selector)
Parameters :
Name Optional
selector No
Returns : void
validateName
validateName(name)
Parameters :
Name Optional
name No
Returns : void
validateProjectName
validateProjectName(projectName)
Parameters :
Name Optional
projectName No

result-matching ""

    No results matching ""