File tree 2 files changed +23
-2
lines changed
2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ export class MainViewModel extends Observable {
17
17
{
18
18
name : 'firebase-database' ,
19
19
} ,
20
+ {
21
+ name : 'firebase-dynamic-links' ,
22
+ } ,
20
23
{
21
24
name : 'firebase-firestore' ,
22
25
} ,
Original file line number Diff line number Diff line change 1
1
import { Observable , EventData , Page } from '@nativescript/core' ;
2
2
import { DemoSharedFirebaseDynamicLinks } from '@demo/shared' ;
3
- import { } from '@nativescript/firebase-dynamic-links' ;
3
+ import { firebase } from '@nativescript/firebase-core' ;
4
+ import '@nativescript/firebase-dynamic-links' ;
5
+ import { DynamicLinkSocialParameters } from '@nativescript/firebase-dynamic-links' ;
4
6
5
7
export function navigatingTo ( args : EventData ) {
6
8
const page = < Page > args . object ;
7
9
page . bindingContext = new DemoModel ( ) ;
8
10
}
9
11
10
12
export class DemoModel extends DemoSharedFirebaseDynamicLinks {
11
-
13
+ constructor ( ) {
14
+ super ( ) ;
15
+ const link = firebase ( ) . dynamicLinks ( ) . createShortLink ( 'https://docs.nativescript.org' , 'https://triniwiz.page.link' ) ;
16
+
17
+ link . social = new DynamicLinkSocialParameters ( ) ;
18
+ link . social . imageUrl = 'https://art.nativescript.org/logo/export/NativeScript_Logo_White_Blue_Rounded.png' ;
19
+
20
+ firebase ( )
21
+ . dynamicLinks ( )
22
+ . buildLink ( link )
23
+ . then ( ( link ) => {
24
+ console . log ( 'link' , link ) ;
25
+ } )
26
+ . catch ( ( e ) => {
27
+ console . log ( 'dynamicLinks: build error' , e ) ;
28
+ } ) ;
29
+ }
12
30
}
You can’t perform that action at this time.
0 commit comments