我正在构建一个Ionic应用程序,并开始深入研究Firebase身份验证方法.到目前为止,我已经设法通过Twitter正确设置登录(我可以登录和注销).
但是,如何设置离子框架的状态,以便在登录时仅显示特定状态(以及页面),在登出时仅显示其他状态(以及页面)?我到目前为止的代码如下所示.
理想情况下,我会有类似变量的东西:
AuthRequired: true
Run Code Online (Sandbox Code Playgroud)
你是怎么做到这一点的?
app.js
// Ionic Starter App
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
// 'starter.services' is found in services.js
// 'starter.controllers' is found in controllers.js
angular.module('starter', ['ionic', 'ngCordova', 'firebase', 'firebase.utils', 'starter.controllers', 'starter.services', 'starter.config', 'starter.auth'])
.run(function($ionicPlatform, Auth, $rootScope) {
$ionicPlatform.ready(function() {
// Hide …Run Code Online (Sandbox Code Playgroud) 可以使用哪些模块/提示来处理AngularJS中的加载?基本上,如何在加载页面时包含加载图标(例如用户的帐户设置或最初加载页面时)?是否有标准程序或ng-模块?
PS.如果我的问题太模糊或不恰当,请纠正我.我认为它已经超越了大多数Angular初学者的思想.
我正在使用以下Git(请参阅此处的代码)作为Phonegap Build的输入,并已正确安装了我的手机上的应用程序(iOS).
该应用程序正确打开,但当我尝试拍照(点击按钮)时没有任何反应.它应该显示相机拍摄的图像.
有人可以向我解释什么不起作用?该教程来自Ionic网站.
替代方案:有人有一个工作.git或phonegap代码?
离子框架提供了一个指令 ,使用以下代码在左侧创建包含列表项和头像的列表:
<div class="list">
<a class="item item-avatar" href="#">
<img src="venkman.jpg">
<h2>Venkman</h2>
<p>Back off, man. I'm a scientist.</p>
</a>
</div>
Run Code Online (Sandbox Code Playgroud)
然而,avators需要是一个图像(看起来像搜索图像).我们如何通过自定义div或文本替换此图像?