addBootstrapToModule | ||||||||||
addBootstrapToModule(source, modulePath, classifiedName, importPath)
|
||||||||||
Custom function to insert an export into NgModule. It also imports it.
Parameters :
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 :
Returns :
Change[]
|
addEntryComponentToModule | ||||||||||
addEntryComponentToModule(source, modulePath, classifiedName, importPath)
|
||||||||||
Custom function to insert an entryComponent into NgModule. It also imports it.
Parameters :
Returns :
Change[]
|
addExportToModule | ||||||||||
addExportToModule(source, modulePath, classifiedName, importPath)
|
||||||||||
Custom function to insert an export into NgModule. It also imports it.
Parameters :
Returns :
Change[]
|
addImportToModule | ||||||||||
addImportToModule(source, modulePath, classifiedName, importPath)
|
||||||||||
Custom function to insert an NgModule into NgModule imports. It also imports the module.
Parameters :
Returns :
Change[]
|
addProviderToModule | ||||||||||
addProviderToModule(source, modulePath, classifiedName, importPath)
|
||||||||||
Custom function to insert a provider into NgModule. It also imports it.
Parameters :
Returns :
Change[]
|
addRouteDeclarationToModule | ||||||||
addRouteDeclarationToModule(source, fileToAdd, routeLiteral)
|
||||||||
Adds a new route declaration to a router module (i.e. has a RouterModule declaration)
Parameters :
Returns :
Change
|
addSymbolToNgModuleMetadata | ||||||||||||
addSymbolToNgModuleMetadata(source, ngModulePath, metadataField, symbolName, importPath)
|
||||||||||||
Parameters :
Returns :
Change[]
|
findNode | ||||||||
findNode(node, kind, text)
|
||||||||
Parameters :
Returns :
ts.Node | null
|
getContentOfKeyLiteral | ||||||
getContentOfKeyLiteral(_source, node)
|
||||||
Parameters :
Returns :
string | null
|
getDecoratorMetadata | ||||||||
getDecoratorMetadata(source, identifier, module)
|
||||||||
Parameters :
Returns :
ts.Node[]
|
getFirstNgModuleName | ||||||
getFirstNgModuleName(source)
|
||||||
Given a source file with @NgModule class(es), find the name of the first @NgModule class.
Parameters :
Returns :
string | undefined
the name of the first |
getMetadataField | ||||||
getMetadataField(node, metadataField)
|
||||||
Parameters :
Returns :
ts.ObjectLiteralElement[]
|
getRouterModuleDeclaration | ||||
getRouterModuleDeclaration(source)
|
||||
Returns the RouterModule declaration from NgModule metadata, if any.
Parameters :
Returns :
ts.Expression | undefined
|
getSourceNodes | ||||||
getSourceNodes(sourceFile)
|
||||||
Get all the nodes from a source.
Parameters :
Returns :
ts.Node[]
An observable of all the nodes in the source. |
insertAfterLastOccurrence | ||||||||||||||||||
insertAfterLastOccurrence(nodes, toInsert, file, fallbackPos, syntaxKind?)
|
||||||||||||||||||
Insert
Parameters :
Returns :
Change
Change instance |
insertImport | ||||||||||||||||||
insertImport(source, fileToEdit, symbolName, fileName, isDefault)
|
||||||||||||||||||
Add Import
Parameters :
Returns :
Change
Change |
isImported | ||||||||
isImported(source, classifiedName, importPath)
|
||||||||
Determine if an import already exists.
Parameters :
Returns :
boolean
|
addModuleImportToModule | |||||||||||||||
addModuleImportToModule(host, modulePath, moduleName, src)
|
|||||||||||||||
Import and add module to specific module path.
Parameters :
|
addModuleImportToRootModule | ||||||||||
addModuleImportToRootModule(host, moduleName, src, project)
|
||||||||||
Import and add module to root app module.
Parameters :
|
getSourceFile | ||||||
getSourceFile(host, path)
|
||||||
Reads file given path and returns TypeScript source file.
Parameters :
Returns :
typescript.SourceFile
|
addModuleToImports | ||||||
addModuleToImports(options: any)
|
||||||
Parameters :
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 :
Returns :
string | null
|
installPackageJsonDependencies |
installPackageJsonDependencies()
|
Returns :
Rule
|
loadPackageVersionGracefully | ||||
loadPackageVersionGracefully(context)
|
||||
Loads the full version from the given Angular package gracefully.
Parameters :
Returns :
string | null
|
Unnamed function | ||||||
Unnamed function(options: any)
|
||||||
Parameters :
Returns :
Rule
|
addPackageJsonDependency | ||||||
addPackageJsonDependency(tree, dependency)
|
||||||
Parameters :
Returns :
void
|
getPackageJsonDependency | ||||||
getPackageJsonDependency(tree, name)
|
||||||
Parameters :
Returns :
NodeDependency | null
|
removePackageJsonDependency | ||||||
removePackageJsonDependency(tree, name)
|
||||||
Parameters :
Returns :
void
|
addPackageToPackageJson | ||||||||
addPackageToPackageJson(host, pkg, version)
|
||||||||
Adds a package to the package.json in the given host tree.
Parameters :
Returns :
Tree
|
addProjectToWorkspace | ||||||||
addProjectToWorkspace(workspace, name, project)
|
||||||||
Parameters :
Returns :
Rule
|
getAppFromConfig | ||||||
getAppFromConfig(config, appIndexOrName)
|
||||||
Parameters :
Returns :
AppConfig | null
|
getConfig | ||||
getConfig(host)
|
||||
Parameters :
Returns :
CliConfig
|
getWorkspace | ||||
getWorkspace(host)
|
||||
Parameters :
Returns :
WorkspaceSchema
|
getWorkspacePath | ||||
getWorkspacePath(host)
|
||||
Parameters :
Returns :
string
|
updateWorkspace | ||||
updateWorkspace(workspace)
|
||||
Parameters :
Returns :
Rule
|
appendPropertyInAstObject | ||||||||||||
appendPropertyInAstObject(recorder, node, propertyName, value, indent)
|
||||||||||||
Parameters :
|
appendValueInAstArray | |||||||||||||||
appendValueInAstArray(recorder, node, value, indent: number)
|
|||||||||||||||
Parameters :
|
findPropertyInAstObject | ||||||
findPropertyInAstObject(node, propertyName)
|
||||||
Parameters :
Returns :
JsonAstNode | null
|
insertPropertyInAstObjectInOrder | ||||||||||||
insertPropertyInAstObjectInOrder(recorder, node, propertyName, value, indent)
|
||||||||||||
Parameters :
|
removePropertyInAstObject | ||||||||
removePropertyInAstObject(recorder, node, propertyName)
|
||||||||
Parameters :
|
applyLintFix | ||||||
applyLintFix(path: string)
|
||||||
Parameters :
Returns :
Rule
|
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 :
Returns :
Rule
|
buildDefaultPath | ||||||
buildDefaultPath(project)
|
||||||
Build a default project path for generating.
Parameters :
Returns :
string
|
getProject | ||||||
getProject(workspaceOrHost, projectName)
|
||||||
Parameters :
Returns :
WorkspaceProject<TProjectType>
|
isWorkspaceProject | ||||||
isWorkspaceProject(project: any)
|
||||||
Parameters :
Returns :
WorkspaceProject
|
isWorkspaceSchema | ||||||
isWorkspaceSchema(workspace: any)
|
||||||
Parameters :
Returns :
WorkspaceSchema
|
buildRelativePath | ||||||
buildRelativePath(from, to)
|
||||||
Build a relative path from one file path to another file path.
Parameters :
Returns :
string
|
findModule | ||||||||||
findModule(host, generateDir, moduleExt, routingModuleExt)
|
||||||||||
Function to find the "closest" module to a generated file's path.
Parameters :
Returns :
Path
|
findModuleFromOptions | ||||||
findModuleFromOptions(host, options)
|
||||||
Find the module referred by a set of options passed to the schematics.
Parameters :
Returns :
Path | undefined
|
findBootstrapModuleCall | ||||||
findBootstrapModuleCall(host, mainPath)
|
||||||
Parameters :
Returns :
ts.CallExpression | null
|
findBootstrapModulePath | ||||||
findBootstrapModulePath(host, mainPath)
|
||||||
Parameters :
Returns :
string
|
getAppModulePath | ||||||
getAppModulePath(host, mainPath)
|
||||||
Parameters :
Returns :
string
|
getProjectFromWorkspace | ||||||
getProjectFromWorkspace(workspace, projectName?)
|
||||||
Finds the specified project configuration in the workspace. Throws an error if the project couldn't be found.
Parameters :
Returns :
WorkspaceProject
|
getProjectTargets | |||||||||
getProjectTargets(projectOrHost, projectName: string)
|
|||||||||
Parameters :
Returns :
WorkspaceTargets
|
getProjectTargets | ||||
getProjectTargets(project)
|
||||
Parameters :
Returns :
WorkspaceTargets
|
getProjectTargets | ||||||
getProjectTargets(workspaceOrHost, projectName)
|
||||||
Parameters :
Returns :
WorkspaceTargets
|
targetBuildNotFoundError |
targetBuildNotFoundError()
|
Returns :
SchematicsException
|
hasNgModuleImport | ||||||||
hasNgModuleImport(tree, modulePath, className)
|
||||||||
Whether the Angular module in the given path imports the specified module class name.
Parameters :
Returns :
boolean
|
parseGermanAddress | ||||
parseGermanAddress(placeResult)
|
||||
Parameters :
Returns :
GermanAddress
|
parseName | ||||||
parseName(path, name)
|
||||||
Parameters :
Returns :
Location
|
relativePathToWorkspaceRoot | ||||
relativePathToWorkspaceRoot(projectRoot)
|
||||
Parameters :
Returns :
string
|
validateHtmlSelector | ||||
validateHtmlSelector(selector)
|
||||
Parameters :
Returns :
void
|
validateName | ||||
validateName(name)
|
||||
Parameters :
Returns :
void
|
validateProjectName | ||||
validateProjectName(projectName)
|
||||
Parameters :
|