當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript core.Principal類代碼示例

本文整理匯總了TypeScript中app/core.Principal的典型用法代碼示例。如果您正苦於以下問題:TypeScript Principal類的具體用法?TypeScript Principal怎麽用?TypeScript Principal使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Principal類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: ngOnInit

 ngOnInit() {
     this.loadAll();
     this.principal.identity().then(account => {
         this.currentAccount = account;
     });
     this.registerChangeInHistoryMessages();
 }
開發者ID:gjik911,項目名稱:git_01,代碼行數:7,代碼來源:history-message.component.ts

示例2: ngOnInit

    ngOnInit() {
        this.sessionsService.findAll().subscribe(sessions => (this.sessions = sessions));

        this.principal.identity().then(account => {
            this.account = account;
        });
    }
開發者ID:mantonaci,項目名稱:jhipster5java10,代碼行數:7,代碼來源:sessions.component.ts

示例3: ngOnInit

 ngOnInit() {
     this.loadAll();
     this.principal.identity().then(account => {
         this.currentAccount = account;
     });
     this.registerChangeInTimeTasks();
 }
開發者ID:crille,項目名稱:konsultklockan,代碼行數:7,代碼來源:time-task.component.ts

示例4: ngOnInit

 ngOnInit() {
     this.loadAll();
     this.principal.identity().then(account => {
         this.currentAccount = account;
     });
     this.registerChangeInFlockRelations();
 }
開發者ID:gjik911,項目名稱:git_01,代碼行數:7,代碼來源:flock-relation.component.ts

示例5:

 () => {
     this.error = null;
     this.success = 'OK';
     this.principal.identity(true).then(account => {
         this.settingsAccount = this.copyAccount(account);
     });
 },
開發者ID:EugeneGoroschenya,項目名稱:jhipster-sample-application,代碼行數:7,代碼來源:settings.component.ts

示例6: ngOnInit

 ngOnInit() {
     this.principal.identity().then(account => {
         this.settingsAccount = this.copyAccount(account);
     });
     this.languageHelper.getAll().then(languages => {
         this.languages = languages;
     });
 }
開發者ID:Doha2012,項目名稱:tutorials,代碼行數:8,代碼來源:settings.component.ts

示例7:

 () => {
     this.error = null;
     this.success = 'OK';
     this.principal.identity(true).then(account => {
         this.settingsAccount = this.copyAccount(account);
     });
     this.languageService.getCurrent().then(current => {
         if (this.settingsAccount.langKey !== current) {
             this.languageService.changeLanguage(this.settingsAccount.langKey);
         }
     });
 },
開發者ID:Doha2012,項目名稱:tutorials,代碼行數:12,代碼來源:settings.component.ts

示例8: getImageUrl

 getImageUrl() {
     return this.isAuthenticated() ? this.principal.getImageUrl() : null;
 }
開發者ID:asaucedo777,項目名稱:jhipsterSampleApplication,代碼行數:3,代碼來源:navbar.component.ts

示例9: isAuthenticated

 isAuthenticated() {
     return this.principal.isAuthenticated();
 }
開發者ID:asaucedo777,項目名稱:jhipsterSampleApplication,代碼行數:3,代碼來源:navbar.component.ts

示例10:

 this.eventManager.subscribe('authenticationSuccess', message => {
     this.principal.identity().then(account => {
         this.account = account;
     });
 });
開發者ID:bec73,項目名稱:flotilla-app,代碼行數:5,代碼來源:home.component.ts


注:本文中的app/core.Principal類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。