a zip code crypto-currency system good for red ONLY

nav-pop-anchor.js 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. (function (factory) {
  2. if (typeof module === "object" && typeof module.exports === "object") {
  3. var v = factory(require, exports);
  4. if (v !== undefined) module.exports = v;
  5. }
  6. else if (typeof define === "function" && define.amd) {
  7. define(["require", "exports", "@angular/core", "../../navigation/deep-linker", "../../navigation/view-controller", "./nav-pop"], factory);
  8. }
  9. })(function (require, exports) {
  10. "use strict";
  11. Object.defineProperty(exports, "__esModule", { value: true });
  12. var core_1 = require("@angular/core");
  13. var deep_linker_1 = require("../../navigation/deep-linker");
  14. var view_controller_1 = require("../../navigation/view-controller");
  15. var nav_pop_1 = require("./nav-pop");
  16. /**
  17. * @hidden
  18. */
  19. var NavPopAnchor = (function () {
  20. function NavPopAnchor(host, linker, viewCtrl) {
  21. this.host = host;
  22. this.linker = linker;
  23. this.viewCtrl = viewCtrl;
  24. }
  25. NavPopAnchor.prototype.updateHref = function () {
  26. if (this.host && this.viewCtrl) {
  27. var previousView = this.host._nav.getPrevious(this.viewCtrl);
  28. this._href = (previousView && this.linker.createUrl(this.host._nav, this.viewCtrl.component, this.viewCtrl.data)) || '#';
  29. }
  30. else {
  31. this._href = '#';
  32. }
  33. };
  34. NavPopAnchor.prototype.ngAfterContentInit = function () {
  35. this.updateHref();
  36. };
  37. NavPopAnchor.decorators = [
  38. { type: core_1.Directive, args: [{
  39. selector: 'a[navPop]',
  40. host: {
  41. '[attr.href]': '_href'
  42. }
  43. },] },
  44. ];
  45. /** @nocollapse */
  46. NavPopAnchor.ctorParameters = function () { return [
  47. { type: nav_pop_1.NavPop, decorators: [{ type: core_1.Optional },] },
  48. { type: deep_linker_1.DeepLinker, },
  49. { type: view_controller_1.ViewController, decorators: [{ type: core_1.Optional },] },
  50. ]; };
  51. return NavPopAnchor;
  52. }());
  53. exports.NavPopAnchor = NavPopAnchor;
  54. });
  55. //# sourceMappingURL=nav-pop-anchor.js.map