Open felipelopes6 opened 6 years ago
So, I found this solution:
I opened my typing.d.ts
and then:
declare class SmartBanner {
constructor (object: any)
}
and in the app.component.ts
I implemented a AfterViewInit:
ngAfterViewInit() {
new SmartBanner({
daysHidden: 15, // days to hide banner after close button is clicked (defaults to 15)
daysReminder: 90, // days to hide banner after "VIEW" button is clicked (defaults to 90)
appStoreLanguage: 'us', // language code for the App Store (defaults to user's browser language)
title: 'MyPage',
author: 'MyCompany LLC',
button: 'VIEW',
store: {
ios: 'On the App Store',
android: 'In Google Play',
windows: 'In Windows store'
},
price: {
ios: 'FREE',
android: 'FREE',
windows: 'FREE'
}
// , theme: '' // put platform type ('ios', 'android', etc.) here to force single theme on all device
// , icon: '' // full path to icon image if not using website icon image
// , force: 'ios' // Uncomment for platform emulation
});
}
And works fine!
Thanks for sharing this, we should add this to the documentation.
I'm new to Angular 2 Can you please give more details like:
How can I use with angular 4+ version?
I tried this https://github.com/kudago/smart-app-banner/issues/81 solution, but it doesn't work