#Comprehensive Introduction to @ngrx/store By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
this.modal.open<string>(SampleModalComponent).then(name => { | |
if (name) { | |
this.title = `Hello ${name}`; | |
} else { | |
this.notification.open('Name was not set', 'danger', 3); | |
} | |
}).catch(e => { | |
// rejected | |
this.notification.open('Modal was closed', 'warning', 3); | |
if (e) { |
import { Component, OnInit } from '@angular/core'; | |
import { ModalContext } from '../modal/modal.service'; | |
@Component({ | |
selector: 'app-sample-modal', | |
templateUrl: './sample-modal.component.html', | |
styleUrls: ['./sample-modal.component.scss'] | |
}) | |
export class SampleModalComponent implements OnInit { |
import { | |
Injectable, | |
ViewContainerRef, | |
ComponentFactoryResolver, | |
ReflectiveInjector, | |
ComponentRef, | |
} from '@angular/core'; | |
@Injectable() | |
export class ModalContext { |
import { | |
Injectable, | |
ViewContainerRef, | |
Component, | |
ViewChild, | |
Directive, | |
AfterViewInit | |
} from '@angular/core'; | |
import { Modal } from './modal.service'; |
#Comprehensive Introduction to @ngrx/store By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
server { | |
listen 80; | |
server_name example.com; | |
location / { | |
return 301 https://example.com$request_uri; | |
} | |
location ~ ^/.well-known/ { | |
root /var/www/ssl/example.com/; | |
} | |
} |
isInAppBrowserInstalled: function(cordovaMetadata) { | |
return (typeof cordova != "undefined" && typeof cordova.InAppBrowser != "undefined"); | |
}, |
isInAppBrowserInstalled: function(cordovaMetadata) { | |
var inAppBrowserNames = ["cordova-plugin-inappbrowser", "org.apache.cordova.inappbrowser"]; | |
return inAppBrowserNames.some(function(name) { | |
return cordovaMetadata.hasOwnProperty(name); | |
}); | |
}, |
angular.module('starter.controllers') | |
.controller('TwitterCtrl', function ($scope, $cordovaOauth) { | |
console.log("twitter"); | |
$cordovaOauth.twitter("uUYq3pK0DNqxCtoiuXvyXKWuV", "O6qxFeKYA1po2KaJUnCMCUJlJqxkYLSM8qxtUKOlJRqPy2An1c").then(function (result) { | |
console.log('success'); | |
console.log(result); | |
}, function (error) { | |
console.log('error'); | |
console.log(error); | |
}); |