Skip to content

Instantly share code, notes, and snippets.

@mbuckley
Forked from frankieyan/test.ts
Created August 26, 2017 17:11
Show Gist options
  • Save mbuckley/6041903052f101a18715ffe37c921bc9 to your computer and use it in GitHub Desktop.
Save mbuckley/6041903052f101a18715ffe37c921bc9 to your computer and use it in GitHub Desktop.
StateService href
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