Angular 5 app loads incorrectly first time on Safari - css

Angular 5.2.5 site. The site works fine on Chrome, Firefox, IE and Edge. In Safari the first time the site loads (or every time if I disable the cache) the content is there but it appears the color and background-color are the same. I removed the sites custome CSS and it gave the same behavior. If the user has cache enabled and they log out then log back in the content correctly shows in the right colors. In the screen shot below I used my mouse to highlight the text fields, just to show that the component correctly loaded in the route but everything is the background color. I also included my package.json.
package.json
{
"name": "mss",
"version": "1.0.0",
"private": true,
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"keywords": [],
"author": "JFI",
"licenses": [
{
"type": "MIT",
"url": "https://github.com/angular/angular.io/blob/master/LICENSE"
}
],
"dependencies": {
"#angular/animations": "5.2.5",
"#angular/cdk": "5.2.5",
"#angular/cli": "1.7.3",
"#angular/common": "5.2.5",
"#angular/compiler": "5.2.5",
"#angular/compiler-cli": "5.2.5",
"#angular/core": "5.2.5",
"#angular/flex-layout": "5.0.0-beta.13",
"#angular/forms": "5.2.5",
"#angular/http": "5.2.5",
"#angular/material": "5.2.5",
"#angular/platform-browser": "5.2.5",
"#angular/platform-browser-dynamic": "5.2.5",
"#angular/platform-server": "5.2.5",
"#angular/router": "5.2.5",
"#angular/upgrade": "5.2.5",
"animate.css": "3.6.1",
"bootstrap": "3.3.7",
"classlist.js": "1.1.20150312",
"core-js": "2.5.7",
"glob": "7.1.2",
"intl": "1.2.5",
"jquery": "3.3.1",
"rxjs": "5.5.6",
"systemjs": "0.20.17",
"typescript": "2.6.2",
"web-animations-js": "2.3.1",
"zone.js": "0.8.20"
},
"devDependencies": {
"#ng-bootstrap/ng-bootstrap": "1.1.1",
"#ng-idle/core": "2.0.0-beta.13",
"#ng-idle/keepalive": "2.0.0-beta.13",
"#swimlane/ngx-charts": "6.1.0",
"#types/angular-idle": "1.1.31",
"#types/core-js": "0.9.43",
"#types/jquery": "3.3.11",
"#types/metismenu": "2.7.1",
"#types/node": "8.0.24",
"#types/selenium-webdriver": "3.0.4",
"angular-calendar": "0.23.7",
"angular-draggable-droppable": "1.0.1",
"angular-resizable-element": "1.2.1",
"angular2-toaster": "4.0.0",
"calendar-utils": "0.1.1",
"css-loader": "0.28.5",
"d3": "4.10.0",
"date-fns": "1.29.0",
"font-awesome": "4.7.0",
"gulp": "3.9.1",
"gulp-clean": "0.3.2",
"gulp-typescript": "3.1.3",
"gulp-util": "3.0.7",
"hammerjs": "2.0.8",
"jquery-slimscroll": "1.3.8",
"less": "3.8.1",
"less-loader": "4.0.5",
"lodash": "4.16.4",
"lodash._reinterpolate": "3.0.0",
"lodash.template": "4.4.0",
"lodash.templatesettings": "4.1.0",
"metismenu": "2.7.4",
"ngx-bootstrap": "2.0.3",
"ngx-breadcrumbs": "0.0.3",
"ngx-cookie": "2.0.1",
"ngx-pagination": "3.0.3",
"positioning": "1.3.0",
"signature_pad": "2.3.2",
"slimscroll": "0.9.1",
"sweetalert2": "7.4.0",
"ts-node": "2.0.0",
"tslint": "4.5.0"
}
}

I could not reproduce this in plunker or stackblitz.
I did fix this. In the main.ts i changed
platformBrowserDynamic().bootstrapModule(AppModule)
to
window.onload = function () { platformBrowserDynamic().bootstrapModule(AppModule); }
It seems like Safari was starting the angular application before all the js files have been unpacked.

Related

Tailwind style not applied with Angular 13

Hi everyone I was trying to implement Tailwind in angular, I installed tailwindcss post css and autoprefixer
{
"name": "ip-tracker",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"#angular/animations": "~13.0.0",
"#angular/common": "~13.0.0",
"#angular/compiler": "~13.0.0",
"#angular/core": "~13.0.0",
"#angular/forms": "~13.0.0",
"#angular/platform-browser": "~13.0.0",
"#angular/platform-browser-dynamic": "~13.0.0",
"#angular/router": "~13.0.0",
"leaflet": "^1.7.1",
"rxjs": "~7.4.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "~13.0.1",
"#angular/cli": "~13.0.1",
"#angular/compiler-cli": "~13.0.0",
"#types/jasmine": "~3.10.0",
"#types/node": "^12.11.1",
"autoprefixer": "^10.4.2",
"jasmine-core": "~3.10.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"postcss": "^8.4.6",
"tailwindcss": "^2.1.2",
"typescript": "~4.4.3"
}
}
and I imported the styles in the style.scss file:
#import "tailwindcss/base";
#import "tailwindcss/components";
#import "tailwindcss/utilities";
and here is my tailwind.config.js file:
module.exports = {
mode: "jit",
purge: {
enabled: true,
content: ["./src/**/*.{html,ts}"],
},
darkMode: false,
theme: {
extend: {},
screens: {
sm: "375px",
lg: "1440px",
},
colors: {
"very-dark-grey": "hsl(0, 0%, 17%)",
"dark-grey": "hsl(0, 0%, 59%)",
},
fontFamily: {
sans: ["Rubik", "sans-serif"],
},
},
plugins: [
require("postcss-import"),
require("tailwindcss"),
require("autoprefixer"),
],
};
but when I use one of the tailwind classes I don't see the style applied to the elements:
<h1 class="text-white">Test</h1>
Can anyone tell me where am I wrong and why?
Thanks so much...
I can't able to figure out the issue. But I tried with the same configuration that you posted above in my tailwind.config.js file. It works fine for me.
My tailwind.config.js file
module.exports =[ {
mode: "jit",
purge: {
enabled: true,
content: ["./src/**/*.{html,ts}"],
},
darkMode: false,
theme: {
extend: {},
screens: {
sm: "375px",
lg: "1440px",
},
colors: {
"very-dark-grey": "hsl(0, 0%, 17%)",
"dark-grey": "hsl(0, 0%, 59%)",
},
fontFamily: {
sans: ["Rubik", "sans-serif"],
},
},
plugins: [
require("postcss-import"),
require("tailwindcss"),
require("autoprefixer"),
]
}]
My Package.json file
{
"name": "tailwind-app",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"#angular/animations": "~13.0.0",
"#angular/common": "~13.0.0",
"#angular/compiler": "~13.0.0",
"#angular/core": "~13.0.0",
"#angular/forms": "~13.0.0",
"#angular/platform-browser": "~13.0.0",
"#angular/platform-browser-dynamic": "~13.0.0",
"#angular/router": "~13.0.0",
"rxjs": "~7.4.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "~13.0.0",
"#angular/cli": "~13.0.0",
"#angular/compiler-cli": "~13.0.0",
"#types/jasmine": "~3.10.0",
"#types/node": "^12.11.1",
"autoprefixer": "^10.4.2",
"jasmine-core": "~3.10.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"postcss": "^8.4.6",
"tailwindcss": "^2.1.2",
"typescript": "~4.4.3"
}
}
styles.css
My app.component.html
Output
To create custom styles, in tailwind.config.js extend object must be added to theme. Inside extend a colors object is added, where its key-value is the name of the custom color and its corresponding value
...
theme: {
extend: {
colors: {
"very-dark-grey": "hsl(0, 0%, 17%)",
"dark-grey": "hsl(0, 0%, 59%)",
},
},
...

Angular 12 data binding problems

I have a project migrated to angular 12.2 with the package.json file configured like this:
{
"name": "xxxx",
"version": "1",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"#agm/core": "^3.0.0-beta.0",
"#angular-slider/ngx-slider": "^2.0.3",
"#angular/animations": "~12.2.0",
"#angular/cdk": "^12.2.11",
"#angular/common": "~12.2.0",
"#angular/compiler": "~12.2.0",
"#angular/core": "~12.2.0",
"#angular/forms": "~12.2.0",
"#angular/platform-browser": "~12.2.0",
"#angular/platform-browser-dynamic": "~12.2.0",
"#angular/router": "~12.2.0",
"#angularclass/hmr": "^3.0.0",
"#ngx-translate/core": "^13.0.0",
"#ngx-translate/http-loader": "^6.0.0",
"#types/geojson": "^7946.0.8",
"#types/googlemaps": "^3.39.12",
"angular-2-local-storage": "^3.0.2",
"angular2-highcharts": "^0.5.5",
"angular2-query-builder": "^0.6.2",
"animate.css": "^4.1.1",
"chart.js": "^3.6.0",
"core-js": "^3.19.0",
"d3-array": "^3.1.1",
"file-saver": "^2.0.5",
"font-awesome": "^4.7.0",
"fullcalendar": "^5.10.0",
"geojson": "^0.5.0",
"gzip-all": "^1.0.0",
"highcharts": "^9.3.0",
"jexl": "^2.3.0",
"jquery": "^3.6.0",
"jsbarcode": "^3.11.5",
"moment": "^2.29.1",
"nanoscroller": "^0.8.7",
"ng2-dragula": "^2.1.1",
"ngx-localized-numbers": "^0.4.1",
"ngx-schema-form": "^2.6.6",
"node-sass": "^6.0.1",
"pg": "^8.7.1",
"primeicons": "^4.1.0",
"primeng": "^12.2.1",
"quill": "^1.3.7",
"rxjs": "~6.6.0",
"ts-helpers": "^1.1.2",
"tslib": "^2.3.0",
"typescript": "^4.2.4",
"uuid": "^8.3.2",
"venn.js": "^0.2.20",
"xlsx": "^0.17.3",
"z-schema": "^4.2.4",
"zone.js": "~0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "~12.2.11",
"#angular/cli": "~12.2.11",
"#angular/compiler-cli": "~12.2.0",
"#angular/language-service": "^12.2.11",
"#types/angular": "^1.8.3",
"#types/jasmine": "~3.8.0",
"#types/jasminewd2": "^2.0.10",
"#types/jquery": "^3.5.8",
"#types/node": "^12.20.36",
"codelyzer": "^6.0.2",
"jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "^7.0.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"protractor": "^7.0.0",
"ts-node": "^10.4.0"
}
}
The tsconfig.app.json file is configured like this:
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": ["googlemaps","jquery","node"]
},
"files": [
"src/main.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
}
The tsconfig.json file is configured like this:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es2018","dom"],
"module": "es2020",
"moduleResolution": "node",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"target": "es2017",
"typeRoots": ["./node_modules/#types"]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true,
//"enableIvy": false,
"strictDomEventTypes": false
}
}
Unfortunately, no data binding is done on any variable of any view, why?
I am using the same configuration on an angular 10 project and everything works fine.
Thanks.
At this time I solved it like this:
example I replaced {{variable}} with <span [innerText]="variable"></span>
However I didn't understand why I can't use {{variable}} syntax ... I hope someone can help me.
Thanks.

how to uninstall ng-multiselect-dropdown

How to uninstall ng-multiselect-dropdown? I tried with npm uninstall ng-multiselect-dropdown, but it did not uninstalled.
ng remove ng-multiselect-dropdown also not working.
This is my package.json
{
"_from": "ng-multiselect-dropdown",
"_id": "ng-multiselect-dropdown#0.3.4",
"_inBundle": false,
"_integrity": "sha512-ZUzA4apGY7Y0MW7scF35iPYy4/DpIRhZcQiTICDJFs66+JoJOE+YqA+Tx9C2Ylv0B8tADX7PAsTQL9Jys1vWiQ==",
"_location": "/ng-multiselect-dropdown",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "ng-multiselect-dropdown",
"name": "ng-multiselect-dropdown",
"escapedName": "ng-multiselect-dropdown",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"bugs": {
"url": "https://github.com/nileshpatel17/ng-multiselect-dropdown/issues"
},
"bundleDependencies": false,
"dependencies": {
"tslib": "^1.9.0"
},
"deprecated": false,
"description": "Angular Multi-Select Dropdown",
"devDependencies": {
"#angular-devkit/build-angular": "~0.802.2",
"#angular/animations": "8.2.2",
"#angular/cli": "^8.2.2",
"#angular/common": "8.2.2",
"#angular/compiler": "8.2.2",
"#angular/compiler-cli": "8.2.2",
"#angular/core": "8.2.2",
"#angular/forms": "8.2.2",
"#angular/http": "7.2.15",
"#angular/language-service": "8.2.2",
"#angular/platform-browser": "8.2.2",
"#angular/platform-browser-dynamic": "8.2.2",
"#angular/router": "8.2.2",
"#types/jasmine": "~3.4.0",
"#types/jasminewd2": "~2.0.2",
"#types/node": "~12.7.2",
"angular-cli-ghpages": "^0.6.0-rc.2",
"angular2-markdown": "^2.2.3",
"codelyzer": "~5.1.0",
"copyfiles": "^2.0.0",
"core-js": "^3.2.1",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"jest": "^24.9.0",
"jest-preset-angular": "^7.1.1",
"karma": "~4.2.0",
"karma-chrome-launcher": "~3.1.0",
"karma-cli": "~2.0.0",
"karma-coverage-istanbul-reporter": "^2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"ng-multiselect-dropdown": "^0.2.11",
"ng-packagr": "^5.5.0",
"ngx-bootstrap": "^5.1.1",
"protractor": "~5.4.2",
"rimraf": "^3.0.0",
"rxjs": "^6.2.1",
"rxjs-compat": "^6.2.1",
"ts-node": "~8.3.0",
"tslint": "~5.19.0",
"typescript": "3.5.3",
"zone.js": "^0.10.2"
},
"es2015_ivy_ngcc": "__ivy_ngcc__/fesm2015/ng-multiselect-dropdown.js",
"es2015": "fesm2015/ng-multiselect-dropdown.js",
"esm2015": "esm2015/ng-multiselect-dropdown.js",
"esm5": "esm5/ng-multiselect-dropdown.js",
"fesm2015_ivy_ngcc": "__ivy_ngcc__/fesm2015/ng-multiselect-dropdown.js",
"fesm2015": "fesm2015/ng-multiselect-dropdown.js",
"fesm5": "fesm5/ng-multiselect-dropdown.js",
"homepage": "https://github.com/nileshpatel17/ng-multiselect-dropdown#readme",
"keywords": [
"angular4",
"angular8",
"angular multiselect dropdown",
"angular4 multiselect dropdown",
"angular8 multiselect dropdown",
"ng multiselect dropdown",
"ng4 multiselect dropdown",
"ng8 multiselect dropdown"
],
"license": "MIT",
"main": "bundles/ng-multiselect-dropdown.umd.js",
"metadata": "ng-multiselect-dropdown.metadata.json",
"module": "fesm5/ng-multiselect-dropdown.js",
"name": "ng-multiselect-dropdown",
"peerDependencies": {
"#angular/common": ">=2.0.0",
"#angular/core": ">=2.0.0"
},
"private": false,
"repository": {
"type": "git",
"url": "git+https://github.com/nileshpatel17/ng-multiselect-dropdown.git"
},
"sideEffects": false,
"typings": "ng-multiselect-dropdown.d.ts",
"version": "0.3.4",
"__processed_by_ivy_ngcc__": {
"es2015": "11.0.9",
"esm2015": "11.0.9",
"esm5": "11.0.9",
"fesm2015": "11.0.9",
"fesm5": "11.0.9",
"main": "11.0.9",
"module": "11.0.9",
"typings": "11.0.9"
},
"scripts": {
"prepublishOnly": "node --eval \"console.error('ERROR: Trying to publish a package that has been compiled by NGCC. This is not allowed.\\nPlease delete and rebuild the package, without compiling with NGCC, before attempting to publish.\\nNote that NGCC may have been run by importing this package into another project that is being built with Ivy enabled.\\n')\" && exit 1"
}
}
could anyone help me?
try
npm uninstall ng-multiselect-dropdown

Angular Material button is not rendering

I have followed steps to install material design, but when I add button I don't get the MD style.
<button mat-button [matMenuTriggerFor]="menu">Menu</button>
<mat-menu #menu="matMenu">
<button mat-menu-item>Item 1</button>
<button mat-menu-item>Item 2</button>
</mat-menu>
Package.json file
{
"name": "apimap",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/animations": "^5.0.2",
"#angular/cdk": "github:angular/cdk-builds",
"#angular/common": "^5.0.0",
"#angular/compiler": "^5.0.0",
"#angular/core": "^5.0.0",
"#angular/forms": "^5.0.0",
"#angular/http": "^5.0.0",
"#angular/material": "github:angular/material2-builds",
"#angular/platform-browser": "^5.0.0",
"#angular/platform-browser-dynamic": "^5.0.0",
"#angular/router": "^5.0.0",
"core-js": "^2.4.1",
"hammerjs": "^2.0.8",
"rxjs": "^5.5.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
"#angular/cli": "1.5.2",
"#angular/compiler-cli": "^5.0.0",
"#angular/language-service": "^5.0.0",
"#types/jasmine": "~2.5.53",
"#types/jasminewd2": "~2.0.2",
"#types/node": "~6.0.60",
"codelyzer": "~3.2.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2"
}
}
I have also added css theme + material design in index.html
Added MD modules in app.mudule.ts but I get a basic html button style, only the mat-menu-item are in MD style.
Update: A screen capture of the button:
when I click on it
Just for confirmation, have you added MatButtonModule in appModule imports? Can't add it as comment because of my reputation :P

Ionic 2 : Firebase Cloud Messaging and Google services errors

I have tried searching at a ton of places to get FCM working. I am using Google Authentication API and have just installed FCM to use Push Notifications. I would like to use both of them. When i do build I get these errors.
* What went wrong:
A problem occurred evaluating root project 'android'.
Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
BUILD FAILED
Total time: 3.002 secs
> For input string: "+"
This is my project.properties file
target=android-25
android.library.reference.1=CordovaLib
cordova.system.library.1=com.facebook.android:facebook-android-sdk:4.+
cordova.system.library.2=com.google.android.gms:play-services-auth:+
cordova.system.library.3=com.google.android.gms:play-services-identity:+
cordova.system.library.4=com.android.support:support-v13:25.1.0
cordova.system.library.5=me.leolin:ShortcutBadger:1.1.17#aar
cordova.system.library.6=com.google.firebase:firebase-messaging:11.0.1
cordova.gradle.include.1=phonegap-plugin-push/starter-push.gradle
Couple of things I tried after reading lot of posts:
1. I removed and added android platform then did the build.
2. I tried changing the versions of below libraries to numerous values, but it does not help.
cordova.system.library.2=com.google.android.gms:play-services-auth:+
cordova.system.library.3=com.google.android.gms:play-services-identity:+
If try changing the version from + to 3.0.0 or 9.8.0 or any version I get this error for firebase
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugApkCopy'.
> Could not find com.google.firebase:firebase-messaging:11.0.1.
Required by:
project :
Note: Changing the same inside the build.gradle file dosen't help as it gets overridden when we do a build.
this is my package.json.
{
"name": "test",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve",
"start": "node ./bin/www"
},
"dependencies": {
"#angular/common": "4.1.2",
"#angular/compiler": "4.1.2",
"#angular/compiler-cli": "4.1.2",
"#angular/core": "4.1.2",
"#angular/forms": "4.1.2",
"#angular/http": "4.1.2",
"#angular/platform-browser": "4.1.2",
"#angular/platform-browser-dynamic": "4.1.2",
"#ionic-native/core": "3.10.2",
"#ionic-native/facebook": "^3.10.2",
"#ionic-native/google-plus": "^3.12.1",
"#ionic-native/native-storage": "^3.10.3",
"#ionic-native/splash-screen": "3.10.2",
"#ionic-native/status-bar": "3.10.2",
"#ionic/storage": "2.0.1",
"body-parser": "^1.17.2",
"cordova-android": "^6.2.3",
"cordova-plugin-console": "^1.0.5",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-facebook4": "^1.9.0",
"cordova-plugin-googleplus": "^5.1.1",
"cordova-plugin-nativestorage": "^2.2.2",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.2.2",
"cordova-plugin-whitelist": "^1.3.1",
"express": "^4.15.3",
"ionic-angular": "3.3.0",
"ionic-native": "^2.5.1",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"mongoose": "^4.11.4",
"morgan": "^1.8.2",
"phonegap-plugin-push": "^2.0.0",
"rxjs": "5.1.1",
"serve-favicon": "^2.4.3",
"socket.io": "^2.0.3",
"socket.io-client": "^2.0.3",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.11"
},
"devDependencies": {
"#ionic/app-scripts": "1.3.7",
"#ionic/cli-plugin-cordova": "1.6.2",
"#ionic/cli-plugin-ionic-angular": "1.4.1",
"ionic": "3.7.0",
"typescript": "2.3.3"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-facebook4": {
"APP_ID": "xxxxxxx2",
"APP_NAME": "test"
},
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": "4xxxxxxxx6-7dsgct91usuntkmomme1n8rq5i7oipq8.apps.googleusercontent.com"
},
"phonegap-plugin-push": {
"SENDER_ID": "81xxxxx8690"
}
},
"platforms": [
"android"
]
},
"main": "index.js",
"keywords": [
"server"
],
"license": "ISC"
}
Can some one please help me out, suggest a better approach to implement Push notification. Thanks in advance!
Try to install Google Repository
Tools -> SDK Manager -> Google Repository
https://i.stack.imgur.com/qe8iu.png

Resources