【发布时间】:2016-03-20 16:06:53
【问题描述】:
确切地说,我正在使用 yeoman 生成一个 Angular 应用程序并使用 phonegap 将其部署到移动平台 (ios),但是我在获取指令工作时遇到了问题。
我有一个名为“header”的指令,它基本上按照盒子上所说的去做,并显示一个标题,看起来像这样。
确切地说,我正在使用 yeoman 生成一个 Angular 应用程序并使用 phonegap 将其部署到移动平台 (ios),但是我在获取指令工作时遇到了问题。
我有一个名为“header”的指令,它基本上按照盒子上所说的去做,并显示一个标题,看起来像这样。
angular.module('myappApp').directive('header', function(contentUpdater) {
function link(scope) {
scope.contentUpdater = contentUpdater;
scope.headerTextThin = scope.contentUpdater.getHeaderTextThin();
scope.headerTextBold = scope.contentUpdater.getHeaderTextBold();
}
return {
restrict: 'E',
link: link,
scope: {
},
templateUrl: 'header.html'
};
});
即使它显示在浏览器上,当我使用 phonegap run ios 进行模拟时,它也不会显示。我确实在 app/scripts/directives/header.html 下有标题,在 app/scripts/directives/header.js 中有 js 文件
【问题讨论】:
标签: javascript ios angularjs cordova