Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
defaultFirebase,
AngularFire,
firebaseAuthConfig,
AuthProviders,
AuthMethods
} from 'angularfire2';
@App({
templateUrl: 'build/app.html',
config: {}, // http://ionicframework.com/docs/v2/api/config/Config/
providers: [
Story,
User,
Beacons,
FIREBASE_PROVIDERS,
defaultFirebase('https://aofs.firebaseio.com/'),
firebaseAuthConfig({
provider: AuthProviders.Facebook,
method: AuthMethods.Popup,
remember: 'default',
scope: ['email']
})
]
})
class MyApp {
// make HelloIonicPage the root (or first) page
rootPage: any = Start;
pages: Array<{ title: string, component: any }>;
constructor(
private app: IonicApp,
private platform: Platform,
import {HomePage} from './pages/home/home';
import {TabsPage} from './pages/tabs/tabs';
import {FIREBASE_PROVIDERS, defaultFirebase, firebaseAuthConfig, AuthProviders, AuthMethods, FirebaseListObservable} from 'angularfire2';
import {UserService} from './common/user.service';
import {AuthService, User} from './common/auth.service';
import {WebRTCConfig} from './common/webrtc.config';
import {WebRTCService} from './common/webrtc.service';
@App({
template: '',
config: {}, // http://ionicframework.com/docs/v2/api/config/Config/
providers: [
FIREBASE_PROVIDERS,
defaultFirebase('https://ng2-webrtc.firebaseio.com/'),
firebaseAuthConfig({
provider: AuthProviders.Google,
method: AuthMethods.Popup,
remember: 'default',
scope: ['email']
}),
WebRTCConfig, UserService, AuthService, WebRTCService],
})
export class MyApp {
// We show the fake page here and will change it after success authorization
rootPage: any = HomePage;
constructor(platform: Platform, webRTC: WebRTCService, authService:AuthService, userService:UserService) {
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
import {App, IonicApp, Platform} from 'ionic/ionic';
import {HelloIonicPage} from './pages/hello-ionic/hello-ionic';
import {Game} from './pages/game/game';
import {Sensors} from './pages/sensors/sensors';
import {Video} from './pages/video/video';
import {Wikipedia} from './pages/wikipedia/wikipedia';
import {Wiki} from './wiki/wiki';
import {FirebaseUrl, FIREBASE_PROVIDERS, defaultFirebase} from 'angularfire2';
@App({
templateUrl: 'build/app.html',
config: {}, // http://ionicframework.com/docs/v2/api/config/Config/
providers: [
FIREBASE_PROVIDERS,
defaultFirebase('https://yourpicks.firebaseio.com/')
]
})
class MyApp {
constructor(app: IonicApp, platform: Platform) {
// set up our app
this.app = app;
this.platform = platform;
this.initializeApp();
// set our app's pages
this.pages = [
{ title: 'Welcome', component: HelloIonicPage },
{ title: 'Game', component: Game },
{ title: 'Wikipedia', component: Wikipedia },
{ title: 'Video', component: Video },
import { StorageSettings } from 'ng2-storage';
import { TOOLTIP_DIRECTIVES } from 'ng2-bootstrap/components/tooltip';
if(window.location.hostname !== 'localhost') enableProdMode();
bootstrap(App, [
Title,
TitleChangerService,
NgStyle,
Auth,
ROUTER_PROVIDERS,
FIREBASE_PROVIDERS,
provide(StorageSettings, { useValue: { prefix: 'dz' } }),
provide(PLATFORM_DIRECTIVES, { useValue: TOOLTIP_DIRECTIVES, multi: true }),
provide(PLATFORM_DIRECTIVES, { useValue: FontAwesomeDirective, multi: true }),
defaultFirebase('https://deckzone.firebaseio.com')
]);
import {AngularFire, defaultFirebase, FIREBASE_PROVIDERS, FirebaseListObservable} from 'angularfire2'
@Component({
selector: 'firebase-demo',
template: `
<h2>firebase demo</h2>
<input type="text">
<button>send</button>
<ul>
<li>{{ message.text }}</li>
</ul>
`,
providers: [
FIREBASE_PROVIDERS,
defaultFirebase('https://fluent-chat-demo.firebaseio.com/')
]
})
export class FirebaseChat {
messages: FirebaseListObservable
constructor(angularFire: AngularFire){
this.messages = angularFire.list('/messages');
}
addMessage(el){
let newMessage = {text: el.value};
this.messages.add(newMessage);
el.value = '';
}
}
import {provide} from 'angular2/core';
import {FIREBASE_PROVIDERS, defaultFirebase} from 'angularfire2';
import {AuthService} from './worker/services/Auth';
import {Backend, BackendConfig} from './worker/services/Backend';
import {QuestionService} from './worker/services/QuestionService';
export const SHARED_PROVIDERS = [
AuthService,
QuestionService,
FIREBASE_PROVIDERS,
defaultFirebase('answers-mobile.firebaseio.com')
];