本文整理汇总了TypeScript中core/application/application.state.provider.ApplicationStateProvider.addChildState方法的典型用法代码示例。如果您正苦于以下问题:TypeScript state.provider.ApplicationStateProvider.addChildState方法的具体用法?TypeScript state.provider.ApplicationStateProvider.addChildState怎么用?TypeScript state.provider.ApplicationStateProvider.addChildState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core/application/application.state.provider.ApplicationStateProvider
的用法示例。
在下文中一共展示了state.provider.ApplicationStateProvider.addChildState方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: require
]).config((applicationStateProvider: ApplicationStateProvider) => {
const taskDetails: INestedState = {
name: 'taskDetails',
url: '/:taskId',
views: {},
data: {
pageTitleDetails: {
title: 'Task Details',
nameParam: 'taskId'
}
}
};
const tasks: INestedState = {
name: 'tasks',
url: '/tasks',
views: {
'insight': {
templateUrl: require('../task/tasks.html'),
controller: 'TasksCtrl',
controllerAs: 'tasks'
},
},
data: {
pageTitleSection: {
title: 'Tasks'
}
},
children: [taskDetails],
};
applicationStateProvider.addChildState(tasks);
});
示例2: require
]).config((applicationStateProvider: ApplicationStateProvider) => {
const detailTabsPanel: INestedState = {
name: 'detailTab',
url: '/:tab',
views: {
'detailTab': {
templateUrl: require('./detail/detailTab/detailTabView.html'),
controller: 'CiDetailTabCtrl',
controllerAs: 'ctrl',
}
}
};
const detailPanel: INestedState = {
name: 'detail',
url: '/detail/:buildId',
views: {
'detail': {
templateUrl: require('./detail/detailView.html'),
controller: 'CiDetailCtrl',
controllerAs: 'ctrl'
}
},
children: [
detailTabsPanel
]
};
const appCI: INestedState = {
name: 'ci',
url: '/ci',
views: {
'insight': {
templateUrl: require('./ci.html'),
controller: 'NetflixCiCtrl',
controllerAs: 'ctrl'
}
},
data: {
pageTitleSection: {
title: 'CI'
}
},
children: [
detailPanel
]
};
applicationStateProvider.addChildState(appCI);
});
示例3: require
]).config((applicationStateProvider: ApplicationStateProvider, stateConfigProvider: StateConfigProvider) => {
const appState: INestedState = {
name: 'analytics',
url: '/analytics',
reloadOnSearch: false,
views: {
'insight': {
templateUrl: require('./application/appTableau.html'),
controller: 'AppTableauCtrl as ctrl',
}
},
data: {
pageTitleSection: {
title: 'Analytics'
}
},
};
const summaryState: INestedState = {
name: 'analytics',
url: '/analytics',
reloadOnSearch: false,
views: {
'main@': {
templateUrl: require('./summary/summaryTableau.html'),
controller: 'SummaryTableauCtrl as ctrl',
}
},
data: {
pageTitleSection: {
title: 'Analytics'
}
},
};
applicationStateProvider.addChildState(appState);
stateConfigProvider.addToRootState(summaryState);
});
示例4: module
module(TASK_STATES, [APPLICATION_STATE_PROVIDER]).config((applicationStateProvider: ApplicationStateProvider) => {
const taskDetails: INestedState = {
name: 'taskDetails',
url: '/:taskId',
views: {},
data: {
pageTitleDetails: {
title: 'Task Details',
nameParam: 'taskId',
},
},
};
const tasks: INestedState = {
name: 'tasks',
url: '/tasks?q',
views: {
insight: {
templateUrl: require('../task/tasks.html'),
controller: 'TasksCtrl',
controllerAs: 'tasks',
},
},
params: {
q: { dynamic: true, value: null },
},
data: {
pageTitleSection: {
title: 'Tasks',
},
},
children: [taskDetails],
};
applicationStateProvider.addChildState(tasks);
});
示例5: require
//.........这里部分代码省略.........
children: [
applicationFastPropertyDetails
]
};
const propInsights: INestedState = {
name: 'propInsights',
abstract: true,
views: {
'insight': {
templateUrl: require('./mainApplicationProperties.html'),
}
},
data: {
pageTitleSection: {
title: 'Fast Properties'
}
},
children: [
applicationFastProperty
]
};
const globalFastPropertyDetails: INestedState = {
name: 'globalFastPropertyDetails',
url: '/:propertyId',
reloadOnSearch: true,
views: {
'detail@../data': {
templateUrl: require('./view/fastPropertyDetails.html'),
controller: 'FastPropertiesDetailsController',
controllerAs: 'details'
}
},
resolve: {
fastProperty: ['$stateParams', ($stateParams: IPropertyDetailsStateParams) => {
return {
propertyId: $stateParams.propertyId,
};
}]
},
data: {
pageTitleDetails: {
title: 'Fast Property Details',
propertyId: 'propertyId',
accountParam: 'accountId',
regionParam: 'region'
},
history: {
type: 'properties',
},
}
};
const globalFastProperties: INestedState = {
name: 'properties',
url: '/properties',
reloadOnSearch: false,
views: {
'master': {
templateUrl: require('./view/properties.html'),
controller: 'FastPropertiesController',
controllerAs: 'fp'
}
},
children: [
globalFastPropertyDetails
]
};
const data: INestedState = {
name: 'data',
url: '/data',
reloadOnSearch: false,
views: {
'main@': {
templateUrl: require('./dataNav/main.html'),
}
},
data: {
pageTitleMain: {
label: 'Properties'
}
},
resolve: {
app: (): any => {
return null;
}
},
children: [
globalFastProperties,
globalFastPropertyRollouts,
]
};
applicationStateProvider.addChildState(globalFastPropertyRollouts);
applicationStateProvider.addChildState(propInsights);
stateConfigProvider.addToRootState(data);
});
示例6: require
(applicationStateProvider: ApplicationStateProvider, stateConfigProvider: StateConfigProvider) => {
const pipelineConfig: INestedState = {
name: 'pipelineConfig',
url: '/configure/:pipelineId?executionId&new',
views: {
pipelines: {
templateUrl: require('../pipeline/config/pipelineConfig.html'),
controller: 'PipelineConfigCtrl',
controllerAs: 'vm',
},
},
data: {
pageTitleSection: {
title: 'pipeline config',
},
},
};
// a specific stage can be deep linked by providing either refId or stageId,
// which will be resolved to stage or step by the executionDetails controller to stage/step parameters,
// replacing the URL
const executionDetails: INestedState = {
name: 'execution',
url: '/:executionId?refId&stage&subStage&step&details&stageId',
params: {
stage: {
value: '0',
},
step: {
value: '0',
},
},
data: {
pageTitleDetails: {
title: 'Execution Details',
nameParam: 'executionId',
},
},
};
const singleExecutionDetails: INestedState = {
name: 'executionDetails',
url: '/details',
views: {
pipelines: { component: SingleExecutionDetails, $type: 'react' },
},
params: {
executionParams: null,
},
abstract: true,
children: [executionDetails],
};
const executions: INestedState = {
name: 'executions',
url: `?startManualExecution&${stateConfigProvider.paramsToQuery(filterModelConfig)}`,
views: {
pipelines: { component: Executions, $type: 'react' },
},
params: stateConfigProvider.buildDynamicParams(filterModelConfig),
children: [executionDetails],
data: {
pageTitleSection: {
title: 'Pipeline Executions',
},
},
};
const pipelines: INestedState = {
name: 'pipelines',
url: '/executions',
abstract: true,
views: {
insight: {
template: '<div ui-view="pipelines" sticky-headers class="flex-fill"></div>',
},
},
children: [executions, pipelineConfig, singleExecutionDetails],
};
applicationStateProvider.addChildState(pipelines);
},
示例7: require
]).config((applicationStateProvider: ApplicationStateProvider) => {
const pipelineConfig: INestedState = {
name: 'pipelineConfig',
url: '/configure/:pipelineId',
views: {
'pipelines': {
templateUrl: require('../pipeline/config/pipelineConfig.html'),
controller: 'PipelineConfigCtrl',
controllerAs: 'vm',
},
},
data: {
pageTitleSection: {
title: 'pipeline config'
}
}
};
// a specific stage can be deep linked by providing either refId or stageId,
// which will be resolved to stage or step by the executionDetails controller to stage/step parameters,
// replacing the URL
const executionDetails: INestedState = {
name: 'execution',
url: '/:executionId?refId&stage&step&details&stageId',
params: {
stage: {
value: '0',
},
step: {
value: '0',
}
},
data: {
pageTitleDetails: {
title: 'Execution Details',
nameParam: 'executionId'
}
}
};
const singleExecutionDetails: INestedState = {
name: 'executionDetails',
url: '/details',
views: {
'pipelines': {
templateUrl: require('./details/singleExecutionDetails.html'),
controller: 'SingleExecutionDetailsCtrl',
controllerAs: 'vm',
},
},
abstract: true,
children: [executionDetails],
};
const executions: INestedState = {
name: 'executions',
url: '',
views: {
'pipelines': {
template: '<executions application="application"></executions>',
},
},
children: [executionDetails],
data: {
pageTitleSection: {
title: 'Pipeline Executions'
}
}
};
const pipelines: INestedState = {
name: 'pipelines',
url: '/executions',
abstract: true,
views: {
'insight': {
template: '<div ui-view="pipelines" sticky-headers class="flex-fill"></div>'
}
},
children: [executions, pipelineConfig, singleExecutionDetails]
};
applicationStateProvider.addChildState(pipelines);
});