Created
July 26, 2017 20:18
-
-
Save frankieyan/2e8af7a52f8a7872187f81538c0a6766 to your computer and use it in GitHub Desktop.
StateService href
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { StateService } from "angular-ui-router"; | |
class Blah { | |
/* @ngInject */ | |
constructor( | |
private AlertManager: any, | |
private $state: StateService; | |
private $sce: angular.ISCEService, | |
) {} | |
public $onInit() { | |
const calendars = this.$state.href("calendars", {}); | |
this.AlertManager.showSuccess(this.$sce.trustAsHtml(`<a href="${calendars}">CALENDARS</a>`), { timeout: 0 }); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment