GithubHelp home page GithubHelp logo

urigo / angular-blaze-template Goto Github PK

View Code? Open in Web Editor NEW
15.0 5.0 6.0 9 KB

Include Blaze templates in your angular-meteor application

Home Page: https://atmospherejs.com/urigo/angular-blaze-template

License: MIT License

JavaScript 100.00%

angular-blaze-template's Introduction

<blaze-template>

Include Blaze templates in your angular-meteor application.

Quick start

In the command line: $ meteor add urigo:angular-blaze-template

You can include Meteor's Blaze native templates with the blaze-template directive.

<template name="todoList">
    A couple of todos
</template>

<blaze-template name="todoList"></blaze-template>

replace directive with template content

Sometimes, the page styling or logic could strictly depend on the DOM tree depth level where the template elements are located. The directive element could be replaced with the contents of the template using the attribute replace as follows:

<blaze-template name="todoList" replace></blaze-template>

WARNING: If replace is used, the original directive DOM element will be completely removed and replaced with the content of the template. Therefore, it will not be possible to use replace in combination with any other directive, like ng-if or ng-switch.

Next steps

Read more on blaze-template, using parameters and binding Blaze templates to Angular's scope in the API docs.

angular-blaze-template's People

Contributors

carlosbaraza avatar dotansimha avatar urigo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

angular-blaze-template's Issues

Getting useraccounts to work with Angular

Using the blaze template {{> atForm}} from useraccounts:bootstrap is giving an error about a missing template: HTML template does not exists!

Here is what I have in my Angular view file:

<template name="atForm">
    {{> atForm}}
</template>

<blaze-template name="atForm"></blaze-template>

Any help greatly appreciated!

Angular-blaze-template not working in my proyect

Hi everyone!
I have some problems with this package, and i don't know how to fix it.

I followed all the angular-meteor tutorial, also i have installed this package because i want to add a wysiwyg editor whitch is supported in meteor by a "template".

This is my index.html

<head>
	<title>My app</title>
	<base href="/">
	<!-- Google font -->
</head>
<body>
	<div ng-app="simple-todos" ng-strict-di="">
		<admin></admin>
	</div>
</body>

My folder structure is call admin component, which call objectDetail component. There is where i need to put my text editor.

But... if i put the template in my index, automatically the app fail.

<head>
	<title>My app</title>
	<base href="/">
	<!-- Google font -->
</head>
<body>
	<div ng-app="simple-todos" ng-strict-di="">
		<admin></admin>
	</div>
</body>
<template name="todoList">
    A couple of todos
</template>

image

Then in objectDetail component i have:

<blaze-template name="todoList"></blaze-template>

But it doesn't work if template is not defined.

I someone could help will be awesome!! Thanks!!

PS: Sorry for my english i'm not so good :(

Customize blaze-template loginButtons

Hi @Urigo ,
i'm trying to customize the

<blaze-template name="loginButtons"></blaze-template>

Result:
2

in this way (as specified here):

<blaze-template name="loginButtons" replace> 
    <div style="color: white">
      <b>Foo</b>
    </div>
</blaze-template>

Result:
1

I would simply change the component in terms of graphics. How can I do?
I think I misinterpreting the documentation.

Thanks

Doesn't work with IronRouter

I've added this template into my angular /client/index.html:

<head>
    <base href="/"> 
</head>

<template name="ironrouternotfound">
    IR Not Found
</template>

<body>
    <div ng-app="myapp" ng-strict-di="">     
        <div ui-view autoscroll="true"></div>
    </div>  
    <blaze-template name="ironrouternotfound"></blaze-template>
</body>

Configured IronRouter to use it - /client/router.js

Router.configure({
    notFoundTemplate: "ironrouternotfound"
});

However I still see the default IronRouter message:

"Couldn't find a template named "ironrouternotfound" or "ironrouternotfound". Are you sure you defined it?"

Does not work with meteor 1.3

Obviously with new npm style import-export system previous versions of meteor packages do not work properly.
Basically i get this error:

WARNING: Tried to load angular more than once.
and:
Uncaught TypeError: _angular2.default.module(...).component

Obviously "angular-blaze-template" imports meteor's angular before i manually import angular from npm.

Am i doing something wrong or should i just wait for the package updates?

loginButtons blaze template not working with 0.1.0

When we upgraded meteor and this plugin from 0.0.1 to 0.1.0 just now, Auth0 log out button doesn't appear at all and log in button doesn't do anything when you click on it. Downgrading to 0.0.1 but keeping all the other meteor upgraded packages fixed it. I'll try and make a simpler repro setup to see if it affects anything besides Auth0.

Which commit was the 0.0.1 release?

Meteor angular tutorial step 8 cannot add blaze

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.