summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/3rd_party/static/testapi-ui/app.js
diff options
context:
space:
mode:
authorSerena Feng <feng.xiaowei@zte.com.cn>2017-08-10 01:20:22 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-10 01:20:22 +0000
commit5550c3e035eeec2706a4ca20fa540e7825aaae68 (patch)
treed18d67ae12f1892213d087428f644fe8654b236e /utils/test/testapi/3rd_party/static/testapi-ui/app.js
parentbbfbad2ae4e152810beecb19ba7a07f89297876a (diff)
parent689d2621c2feb45c89501d5b538d85c71db99025 (diff)
Merge "add Pods page in webportal"
Diffstat (limited to 'utils/test/testapi/3rd_party/static/testapi-ui/app.js')
-rw-r--r--utils/test/testapi/3rd_party/static/testapi-ui/app.js24
1 files changed, 20 insertions, 4 deletions
diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/app.js b/utils/test/testapi/3rd_party/static/testapi-ui/app.js
index bb31ab081..5f5b86159 100644
--- a/utils/test/testapi/3rd_party/static/testapi-ui/app.js
+++ b/utils/test/testapi/3rd_party/static/testapi-ui/app.js
@@ -26,6 +26,22 @@
.module('testapiApp')
.config(configureRoutes);
+ angular
+ .module('testapiApp')
+ .directive('dynamicModel', ['$compile', '$parse', function ($compile, $parse) {
+ return {
+ restrict: 'A',
+ terminal: true,
+ priority: 100000,
+ link: function (scope, elem) {
+ var name = $parse(elem.attr('dynamic-model'))(scope);
+ elem.removeAttr('dynamic-model');
+ elem.attr('ng-model', name);
+ $compile(elem)(scope);
+ }
+ };
+ }]);
+
configureRoutes.$inject = ['$stateProvider', '$urlRouterProvider'];
/**
@@ -43,10 +59,10 @@
url: '/about',
templateUrl: 'testapi-ui/components/about/about.html'
}).
- state('guidelines', {
- url: '/guidelines',
- templateUrl: 'testapi-ui/components/guidelines/guidelines.html',
- controller: 'GuidelinesController as ctrl'
+ state('pods', {
+ url: '/pods',
+ templateUrl: 'testapi-ui/components/pods/pods.html',
+ controller: 'PodsController as ctrl'
}).
state('communityResults', {
url: '/community_results',