Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config and custom template support #36

Merged
merged 4 commits into from Apr 24, 2016

Conversation

Projects
None yet
2 participants
@ncoden
Copy link
Contributor

commented Apr 23, 2016

Implement one proposal from #34

Allow to:

  • Configure plugin in Angular config phase, instead of in the HTML
  • Use a custom flash message template, given in config or transcluded

Other changes:

  • Add default configuration
  • Write HTML on several lines

Example:

app.config((FlashProvider) => {
    Flashprovider.setTimeout(3000); // default: 5000

    FlashProvider.setTemplatePreset('transclude'); // default: 'bootstrap'
    // Or:
    Flash provider.setTemplate('{{ flash.text }}');
});
<flash-message>
    <div class="my-flash-message">
        {{ flash.text }}
    </div>
</flash-message>
@RoopeHakulinen

This comment has been minimized.

Copy link
Collaborator

commented Apr 23, 2016

Thanks for the PR. I hope to get it checked during the weekend!

@ncoden

This comment has been minimized.

Copy link
Contributor Author

commented Apr 23, 2016

Hi. I finally found some bugs I don't know how to fix: How to pass datas from a directive to the scope (or wathever) of its transcluded content. I didn't now that the transcluded content inherit the scope of the directive parent.

@ncoden

This comment has been minimized.

Copy link
Contributor Author

commented Apr 24, 2016

I fixed it. I didn't found any doc / questions and solutions on forums about this problem, so it's a little dirty. But it do the job :)

@RoopeHakulinen

This comment has been minimized.

Copy link
Collaborator

commented Apr 24, 2016

Hey, I took a look and it seems to work okay with the current usage also which is great! Now, to publish this we would need a compiled version and documentation.

To compile a new dist files and run tests against them, run

npm install
npm install -g grunt
grunt
./node_modules/karma/bin/karma start

Documentation can be found from README.md and demo/index.html, these would need to be updated accordingly.

If you could take care of those parts, I'd be happy to draft a new release (v2.3.0) for this.

@ncoden

This comment has been minimized.

Copy link
Contributor Author

commented Apr 24, 2016

Ok, I thought you would do this in an other "Release x.x.x" commit.
I already done theses commands to check if all work, than removed changes

I'm adding documentation :)

ncoden added some commits Apr 23, 2016

Add config and custom template support
Allow to:
- Configure plugin in Angular config phase, instead of in the HTML
- Use a custom flash message template, given in config or transcluded

Other changes:
- Add default configuration
- Write HTML on several lines

@ncoden ncoden force-pushed the ncoden:feature/custom-template branch from 61c707a to ebb0c5a Apr 24, 2016

@ncoden

This comment has been minimized.

Copy link
Contributor Author

commented Apr 24, 2016

poke @RoopeHakulinen
2.3.0 ready. I included the commit you just made ;)

@RoopeHakulinen RoopeHakulinen merged commit bc0fdb8 into sachinchoolur:master Apr 24, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@RoopeHakulinen

This comment has been minimized.

Copy link
Collaborator

commented Apr 24, 2016

Great, seems to work on demo, tests pass and README & demo is updated. I'll draft a release soon.

Thank you so much for this and keep up the good work! :)

@ncoden

This comment has been minimized.

Copy link
Contributor Author

commented Apr 24, 2016

I've already changed the version number. You only have too publish on npm & bower :)

@RoopeHakulinen

This comment has been minimized.

Copy link
Collaborator

commented Apr 24, 2016

Yeah, I noticed and those are done already. Thanks again :)

@ncoden

This comment has been minimized.

Copy link
Contributor Author

commented Apr 24, 2016

No problem. I only need these features.
Thank you for added me to contributors.

@ncoden ncoden deleted the ncoden:feature/custom-template branch Apr 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.