Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
凌波微步_大先生
dashboard
提交
94ec5690
D
dashboard
项目概览
凌波微步_大先生
/
dashboard
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dashboard
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
94ec5690
编写于
10月 28, 2015
作者:
B
bryk
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master' into travis-configuration
上级
2a79d6bc
62d81d16
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
40 addition
and
78 deletion
+40
-78
bower.json
bower.json
+1
-10
src/app/frontend/index.html
src/app/frontend/index.html
+1
-1
src/app/frontend/index.module.js
src/app/frontend/index.module.js
+13
-10
src/app/frontend/index.route.js
src/app/frontend/index.route.js
+3
-18
src/app/frontend/main/main.controller.js
src/app/frontend/main/main.controller.js
+5
-8
src/app/frontend/main/main.html
src/app/frontend/main/main.html
+1
-1
src/app/frontend/main/main.module.js
src/app/frontend/main/main.module.js
+5
-8
src/app/frontend/main/main.route.js
src/app/frontend/main/main.route.js
+11
-22
未找到文件。
bower.json
浏览文件 @
94ec5690
...
...
@@ -10,21 +10,12 @@
"angular-aria"
:
"~1.4.2"
,
"angular-material"
:
"~0.10.1"
,
"angular-messages"
:
"~1.4.2"
,
"angular-new-router"
:
"~0.5.3"
,
"angular-resource"
:
"~1.4.2"
,
"angular-route"
:
"~1.4.2"
,
"angular-sanitize"
:
"~1.4.2"
},
"devDependencies"
:
{
"angular-mocks"
:
"~1.4.2"
,
"google-closure-library"
:
"*"
},
"//"
:
"Some dependencies do not have main files defined. Override this here so that"
,
"//"
:
"build tools know what files to serve."
,
"overrides"
:
{
"angular-new-router"
:
{
"main"
:
[
"dist/router.es5.js"
]
}
}
}
src/app/frontend/index.html
浏览文件 @
94ec5690
...
...
@@ -26,7 +26,7 @@
experience.</p>
<![endif]-->
<div
ng-view
port
ng-controller=
"RouterController"
>
</div>
<div
ng-view
>
<!-- Application content is inserted here. -->
</div>
<!-- build:js console/vendor.js -->
<!-- bower:js -->
...
...
src/app/frontend/index.module.js
浏览文件 @
94ec5690
...
...
@@ -16,16 +16,19 @@
* @fileoverview Entry point module to the application. Loads and configures other modules needed
* to bootstrap the application.
*/
import
{
config
}
from
'
./index.config
'
;
import
{
RouterController
,
routerConfig
}
from
'
./index.route
'
;
import
{
runBlock
}
from
'
./index.run
'
;
import
{
MainController
}
from
'
./main/main.controller
'
;
import
routeConfig
from
'
./index.route
'
;
import
mainModule
from
'
./main/main.module
'
;
export
default
angular
.
module
(
'
kubernetesConsole
'
,
[
'
ngAnimate
'
,
'
ngSanitize
'
,
'
ngMessages
'
,
'
ngAria
'
,
'
ngResource
'
,
'
ngNewRouter
'
,
'
ngMaterial
'
])
.
config
(
config
)
.
config
(
routerConfig
)
.
run
(
runBlock
)
.
controller
(
'
RouterController
'
,
RouterController
)
.
controller
(
'
MainController
'
,
MainController
);
[
'
ngAnimate
'
,
'
ngAria
'
,
'
ngMaterial
'
,
'
ngMessages
'
,
'
ngResource
'
,
'
ngRoute
'
,
'
ngSanitize
'
,
mainModule
.
name
,
])
.
config
(
routeConfig
);
src/app/frontend/index.route.js
浏览文件 @
94ec5690
...
...
@@ -14,24 +14,9 @@
/**
* @param {!
ngNewRouter.$componentLoaderProvider} $componentLoader
Provider
* @param {!
angular.$routeProvider} $route
Provider
* @ngInject
*/
export
function
routerConfig
(
$componentLoaderProvider
)
{
$componentLoaderProvider
.
setTemplateMapping
(
function
(
name
)
{
return
`
${
name
}
/
${
name
}
.html`
;
});
}
export
class
RouterController
{
/**
* @param {!ngNewRouter.$router} $router
* @ngInject
*/
constructor
(
$router
)
{
$router
.
config
([
{
path
:
'
/
'
,
component
:
'
main
'
},
]);
}
export
default
function
routeConfig
(
$routeProvider
)
{
// TODO(bryk): Configure 'otherwise' route here.
}
src/app/frontend/main/main.controller.js
浏览文件 @
94ec5690
...
...
@@ -13,18 +13,15 @@
// limitations under the License.
export
class
MainController
{
constructor
()
{
/** @export */
this
.
testValue
=
7
;
}
export
default
class
MainController
{
/**
* @param {!angular.$timeout} $timeout
* @ngInject
* @export
*/
activate
(
$timeout
)
{
constructor
(
$timeout
)
{
/** @export */
this
.
testValue
=
7
;
$timeout
(()
=>
{
this
.
testValue
=
8
;
},
4000
);
...
...
src/app/frontend/main/main.html
浏览文件 @
94ec5690
<div
layout=
"vertical"
layout-fill
>
<md-content>
<header>
Hello world! {{
main
.testValue}}
Hello world! {{
ctrl
.testValue}}
</header>
<section
class=
"jumbotron"
>
...
...
src/app/frontend/
index.run
.js
→
src/app/frontend/
main/main.module
.js
浏览文件 @
94ec5690
// Copyright 2015 Google Inc.
// Copyright 2015 Google Inc.
All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
...
...
@@ -12,11 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import
routeConfig
from
'
./main.route
'
;
/**
* @param {!angular.$log} $log
* @ngInject
*/
export
function
runBlock
(
$log
)
{
$log
.
debug
(
'
runBlock end
'
);
}
export
default
angular
.
module
(
'
kubernetesConsole.main
'
,
[])
.
config
(
routeConfig
);
src/app/
externs/angular-new-router
.js
→
src/app/
frontend/main/main.route
.js
浏览文件 @
94ec5690
// Copyright 2015 Google Inc.
// Copyright 2015 Google Inc.
All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
...
...
@@ -12,28 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @fileoverview Externs for Angular router: https://github.com/angular/router
*
* TODO(bryk): Move the externs out of this project.
*/
/** @const */
var
ngNewRouter
=
{};
/**
* @typedef {{
* setTemplateMapping: function(function(string):string)
* }}
*/
ngNewRouter
.
$componentLoaderProvider
=
{};
import
MainController
from
'
./main.controller
'
;
/**
* @typedef {{
* config: function(!Array<{path: string, component: string}>)
* }}
* @param {!angular.$routeProvider} $routeProvider
* @ngInject
*/
ngNewRouter
.
$router
=
{};
export
default
function
routeConfig
(
$routeProvider
)
{
$routeProvider
.
when
(
'
/
'
,
{
templateUrl
:
'
main/main.html
'
,
controller
:
MainController
,
controllerAs
:
'
ctrl
'
,
});
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录