Is it possible to dynamically change global stylesheets in Angular 2?

Is it possible to dynamically change global stylesheets? EDIT: The purpose is to allow the user to pick the styles he prefers. In Angular 1, I was able to wrap a controller around the head tag and use bindings in there. Example below (simplified code): index.html <!DOCTYPE html> <html ng-app=”app” ng-controller=”AppController”> <head> <title>Title</title> <link rel=”stylesheet” … Read more

user.emailVerified doesn’t change after clicking email verification link firebase

After learning sending email verification is possible in latest firebase, although the docs are missing that, I wanted to test it for myself. Using the snippet below: Auth.$onAuthStateChanged(function(firebaseUser) { if (firebaseUser) { console.log(firebaseUser); if (firebaseUser.emailVerified) { // console.log(firebaseUser.emailVerified); toastr.success(‘Email verified’); } else { toastr.info(‘Do verify email’); } } }) The console.log(firebaseUser.emailVerified) returns false, always, although … Read more

_react2.default.PropTypes.function is undefined

So I have a Button component import React, { Component } from ‘react’; import { View, Text, TouchableNativeFeedback } from ‘react-native’; class Button extends Component { generateComponent() { const { buttonStyle, textStyle } = this.styles; const { text } = this.props; switch (this.props.platform) { case ‘android’: return ( <TouchableNativeFeedback onPress={this.props.onPress}> <View style={buttonStyle}> <Text style={textStyle}>{text}</Text> </View> … Read more

Typescript : Type ‘Promise<{}>‘ is not assignable to type ‘Promise

I have the following function : let templateLoader = (onDidFinishLoad : Function, onDidFailLoad : Function) => (url : string) : Promise<void> => new Promise( (resolve,reject) => { mainWindow.loadURL(url); mainWindow.webContents.once( ‘did-finish-load’, () => { onDidFinishLoad(resolve); } ); mainWindow.webContents.once( ‘did-fail-load’, (event,errorCode,errorDescription) => { onDidFailLoad(reject,errorDescription); } ); } ); I’ve got the following compilation error: ERROR in [at-loader] … Read more

angular 4 how to access ViewChildren _results

i have a list of checkboxes inside an ngFor: <md-checkbox #hangcheck [id]=”hangout?.$key” class=”mychecks” > I’m Interested </md-checkbox> i refrence them in the component like so: @ViewChildren(“hangcheck”) hangchecks: QueryList<any>; then in ngAfterViewInit i need to loop them: ngAfterViewInit(){ console.log(‘the array: ‘,this.hangchecks) this.hangchecks._results.forEach((item) => { console.log(‘the item: ‘,item) }); } but i get: Property ‘_results’ is private … Read more

ReferenceError: “Sheets” is not defined

This is my first attempt with script editor. I was assigned to do a script to crate pivot table for google sheet. //creating pivot table through script editor for google sheet function addPivotTable() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheetName = “Sheet1”; // Create a new sheet which will contain our Pivot Table var pivotTableSheet … Read more